Talk about the feeling of Python

Source: Internet
Author: User

Write in front

I have been using Python for several years, the first to learn to use Python or because of the interest in artificial neural networks, Python has a very useful Ann library Neurolab. I am actually a beginner, at best, the introduction of the bar, write this one to review their own learning, and secondly to rouse themselves slightly lazy spirit, learning can not stop AH.

First, Python is an explanatory language, which is what makes Python seem "efficient". You know, however, that the famous Instagram server is built with Python+django and has more than 700 million live users. To know that Python+django is a web framework that is known for its slow speed, it must be one of the advantages of Python that attracts them deeply. Yes, the advantage is that the development efficiency is high.

Python is a programming language this lets you work quickly and integrate systems more effectively.

--From the Python website www.python.org

Python is a language that runs less quickly, but lets you go all the way through development. It's a little anti-human indentation that makes you crazy, but at the same time the simple syntax makes you yimushihang. Not to mention, it has tons of libraries, out of the box, so that python becomes the Hundred King Kong, and can be the perfect operation on all major platforms. It can be said that there is no best language, only the most appropriate language.

The latest Tiobe programming language, Python has reached the fourth place, 3.777%, tightly followed by C + +. When it comes to the recent rise of Python, the rise of artificial intelligence cannot be discussed. Artificial intelligence is now in its third climax, thanks to deep-learning learning technology. With the appearance of Theano, TensorFlow, Caffee and so on, the deep learning really went into the ordinary people's home, and opened the large-scale application of AI. Python calls the ML framework to say that the process is completely painless and fast and efficient. Its scripted development approach provides the ability to test errors quickly, making data analysis, processing, and training time much shorter. Can say now again to learn again python sterilization!

IDE, previously used the old Python artifact Pycharm, but now has another choice of visual Studio Code. This is an editor developed by the original Eclipse developer, with the greatest features of unlimited extensibility and behind the support of Microsoft Daddy. By extension, it can do almost all language development, and it's small, fast, and has him on Windows and Mac.

I plan to use a series of blog posts, relive Python3 basics, advanced knowledge, and combine the skills of Vscode to share some of the little things I do with neural networks. The picture is fun, also let more people pay attention to Python3, pay attention to Vscode.

Variables for Python3

Let's start today with a Python3 variable:

A = 1

This sentence defines a variable A and initializes its value to 1. At the same time, variable A is an integral type. Other types include floating-point number, String, Boolean (True/false), and Null (None). Python is a typical dynamic type language, and the declaration of a type is omitted. This has the benefit of making development faster and easier, but the disadvantage is that the name of the variable and the spelling error can also cause unexpected bugs. Of course, some third-party plug-ins can prompt these questions, but still have to form a careful habit.

Assignment value:

b = A

This sentence declares a new variable B, so that the value of variable B equals the value of a, which is 1.

is not very simple, to a small problem:

Is ABC or xyz the last to print?

If understood mathematically, it would be wrong to draw the b a same, and it should be ‘XYZ‘ , but the actual b value is‘ABC‘

Execution a = ‘ABC‘ , the interpreter creates a string ‘ABC‘ and a variable a , and a points to ‘ABC‘(这类似于C/C++语言的指针) :

Executes b = a , the interpreter creates the variable b and points to b a the string that points to ‘ABC‘ :

Execute a = ‘XYZ‘ , the interpreter creates the string ' XYZ ' and puts a the pointer instead ‘XYZ‘ , but b does not change:

So, the b result of the last print variable is naturally ‘ABC‘ .

PS. This topic is excerpted from Liaoche's website:

Https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/ 001431658624177ea4f8fcb06bc4d0e8aab2fd7aa65dd95000

Talk about the feeling of Python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.