I. Errors1. Some errors are caused by problems with the program writing, such as the output of the integer output string, which we often call bug,bug is necessary to repair.2. Some errors are caused by user input, such as allowing the user to enter
1.1 Variables
Variable names can only contain letters, numbers, and underscores, and variable names may begin with a letter or underscore, but cannot begin with a number
Do not use Python keywords and function names as variable names
First, install the XLRD moduleDownload the HTTP://PYPI.PYTHON.ORG/PYPI/XLRD module installation to the Python website, provided the Python environment is already installed.Second, the use of the introduction1. Import ModuleImport xlrd2. Open Excel
Install the virtual environment when the problem encountered, the process is very disturbing, here simple and direct sharing, is to solve the problem.Install the virtual environment (must be in the networked state)$ sudo pip install virtualenv$ sudo
1th programming and programming language 1.1 what is programmingIn the literal sense, programming is "writing programs". So:Who's going to write it? ProgrammersHow to write? -Write using a programming language, as required.What is a program? -The
Origin:Studying Python UI programming, I prefer its native component, so I learn tkinter, TTK component usage. Find a calculator open source code, slightly trimming, think of memo.Its interface:1. Source code (Python 2.7):#Encoding:utf-8
12-1. Path search and search path. What is the difference between a path search and a search path?The former refers to the operation of finding a file, which is to find a set of directories.12-2.Import properties. Suppose you have a Foo () function
1. Iterate multiple sequences simultaneously (zip (function))Use the zip () function to iterate over multiple sequences at the same time.>>> X = [1, 2, 3, 4, 5, 6]>>> Y = [121, 223, 666, 919, 2333]forin Zip (X, Y): ... Print (x, y) ... 1 1212 22
Each specific problem has specific implementation methods, and for the same class of problems, different concrete methods can be abstracted into this kind of method, when given a specific input, this kind of method will become applicable to a
"Character encoding and transcoding"Why Encode and TranscodeBecause each country computer's character encoding format is not unified (column China: GBK), the same software put to different countries of the computer will appear garbled, this
Age = 25
name = ' Caroline '
Print (' {0} is {1} years. '. Format (name, age) #输出参数
Print (' {0} is a girl. '. Format (name)
Print (' {0:.3} is a decimal. '. Format (1/3)) #小数点后三位
Print (' {0:_^11} is a one-length. '. Format
We often encounter a lot of whitespace in the processing of the problem, a one to remove the manual is not what we programmers should do, today this tip of the article play snake nets to tell you, if you use Python to remove the space on both sides
Self-learning python for some time, always want to get an interesting thing, so take the socket to do a chat room, can one-to-many, single-to full-duplex chat. The following may be perfect code in play anything a GUI interface, compared with the
1. First you need some basic knowledge of Python and related development environment, no relevant basis of the students recommend to go to NetEase cloud Mooc to watch learning related tutorials2. What is a web crawler?We use the Internet to enter
Readme: Involving Python knowledge points
Data type
User-to-program interaction
While loop
If.. else judgment
Approximate flowchart:Basic requirements:
Let the user enter the user name password
Show welcome
1 Exercises
Describe the differences between compiled and interpreted languages, and list which languages you know are compiled and which are interpreted
Compiled language: Fast execution, Debug trouble Interpreting language: Slow
This article mainly introduces the Python learning necessary knowledge summary of relevant information, the need for friends can refer to the following
One, variable1. Variables• Refers to the amount of variable in the course of execution of the
function functions are one of the core contents of Python programming, and it is also an important piece. The following article mainly introduces you to the implementation of the specified time in Python, the function of the relevant data, the text
Python functions,1. Create a function
Start with the 'def 'keyword, followed by the function name, and a parameter in parentheses, followed by a colon, return, and None if ruturn is not written.
Def Greet (name): print ("Hello" + name) Greet
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