Original link: http://www.kuqin.com/shuoit/20140728/341451.htmlMany Python beginners want to know which version of Python they should start learning from. My answer to this question is "you learn the version of the tutorial you like and then check
Many beginners in Python will ask: Which version of Python should I learn? For this question, my answer is usually "first choose the Python tutorial that best suits you, which version of Python you use in the tutorial, and you use that version."
1 Python Introduction 1.1 What is PythonPython is an object-oriented, interpreted computer programming language, invented by Dutchman Guido van Rossum (Guido van Rossum) in 1989, and the first public offering was released in 1991. The latest version
How to create a generator:For x in range (1,10000000), Sir into a list [1........9999999] if we only want the next few elements, we will find a lot of wasted space. So, if the list element can be calculated according to an algorithm, can we continue
Python built-in functions (52) -- range, python built-in 52 range
English document:
range(
Stop)
range(
Start,
Stop[,
Step])
Rather than being a function,
rangeIs actually an immutable sequence type, as specified ented
In order not to take in too much of a burden, Python 3.0 did not consider downward compatibility when designing. As a result, many programs designed for early Python versions cannot perform properly on Python 3.0.
To take care of the existing
Question:
lst = [lambda x: x*i for i in range(4)]res = [m(2) for m in lst]print res
Actual output: [6, 6, 6, 6]
How can I change the output value to [0, 2, 4, 6? As follows:
lst = [lambda x, i=i: x*i for i in range(4)]res = [m(2) for m in lst]print
Python 3.0 is often called Python3000 or Py3k. Compared with earlier versions of Python, this is a major upgrade. Python3.0 did not consider backward compatibility during design so as not to bring too much burden into it.
Differences between Python2.
python2.x and 3.x version differences
The 3.0 version of Python, often referred to as Python 3000, or simply py3k. This is a large upgrade relative to earlier versions of Python.
In order not to take in too much of a burden, Python 3.0 did not
The Python 3.x starting version is Python 3.0, and the latest version is 3.3.3
Guido van Rossum, the father of Python, talked about the idea of Python 3.0:
Until backward compatibility is broken, many flaws and errors cannot be repaired. As a
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.