1, the founder of Python: Guido van Rossum (Uncle Tortoise)2, the classification of Python.Compiled: One-time, all the programs are compiled into binary files, and then run.Advantages: Fast running speed.Disadvantage: The development efficiency is
Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!Original chain: http://www.cnblogs.com/vamei/archive/2012/07/09/2582499.htmlNote: There is a more awkward noun; table derivation, Generator Gen (),
#常用的字符串操作#somestring. Capitalize () capital letter, no parameters required#somestring. Lower () Convert letters to lowercase#somestring. Upper () converts letters to uppercase#somestring. Count () The number of occurrences of the statistic parameter#
1. Use four spaces as indentation2. Do not exceed 79 characters in one line of code3. Use blank lines to split classes, functions, and chunks of code4. Comment Exclusive Line5. Working with document strings6. On either side of the operator, add a
ImportRequestsImport TimeImportXml.etree.ElementTree as ET fromMultiprocessing.dummyImportPool as Threadpoo; fromXml.parsers.expatImportparsercreateclassDefaultsaxhandler (object):def __init__(self, Provinces):
DescribeThe uniform () method randomly generates the next real number, which is within the [x, Y] range.GrammarThe following is the syntax for the uniform () method:Import Randomrandom.uniform (x, y)Note:uniform () is not directly accessible, you
DescribeThe Ljust () method returns the left alignment of the original string and fills the new string with a space to the specified length. Returns the original string if the specified length is less than the length of the original
first edited September 29, 2017 9:15:21SummaryI. Character encodingTwo. Data typeThree. Process ControlHomeworkSummary todaySummaryReferences: Alex
Character encoding
String, List of additions and deletions to search
For, while Loop
#!/usr/bin/env python#-*- coding:utf-8 -*-#思路: Remove the table header first, then the For loop (Len (header data length)), Insert header and data one by one as a dictionary into the database Import xlrddef flask_openexcel (file= ' ceshi.xlsx '):
Python has been very hot lately and is now third. Because I was born afraid of snakes, I never dared to touch python, and I couldn't break my inner fear. But he was so hot that I couldn't be indifferent to him.Python is a dynamic interpretation of
A big lock in a small lock.Import Threadingimport timedef run1 (): print ("Grab the first part data") Lock.acquire () global num num + = 1 lock.release () return numdef run2 (): print ("Grab the second part data")
Python is an object-oriented, interpreted computer programming language, invented by Dutchman Guido van Rossum in 1989, and the first public release was released in 1991.Since the invention of Python, by the majority of users like, in the major
Because it is reading self-taught python, began soon after the introduction of the module function, and has been on the idle edit after the run, trying to find its use from the results, but the results have been no results, but also on the internet
Time.time ()Returns the time as a floating-point number.On Windows and most UNIX systems, the era is January 1, 1970 00:00:00 (UTC), and the leap second does not count toward the number of seconds since the epoch.>>> time.time () 1508211081.817371>>>
DescribeThe complex () function is used to create a complex number with a value of real + Imag * j, or to convert a string or plural. If the first argument is a string, you do not need to specify a second parameter:GrammarComplex syntax:Class
Describethe int () function is used to convert a string or number to an integral type.GrammarThe following is the syntax for the Int () method:class int (x, base=10)Parameters
X--string or number.
Base--binary number, default decimal.
DescribeThe repr () function converts an object into a form for the interpreter to read.GrammarThe following is the syntax for the Repr () method:Repr (object)Parameters
Object--Objects.
return valueReturns the string format of an
1. Traverse the entire list1 magicians = ['Alice','David',' Carolina']2 for in magicians:3 print(magician)2. Create a list of values2.1. Use function Range ()1 for in range (1.5):2print (value) # Prints 1 2 3 4 and does not print 5. 2.2.
Summary:1. Language classification2. Python Interpreter3. Python installation (MAC environment
Language classification
Compile-and-interpret
Compiled: High execution efficiency but poor portability
Explanatory:
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