This series of articles is my python learning notes, learning courses "Basics of small turtles zero learning python", namely infringement deleted.
Chapter One
Compare the output statement
>>> print("I love fishc.com") #python3
I love fishc.com
>>> print "I love fishc.com" #python2
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("I love fishc.com")?
>>> printf( "I love fishc.com") #C语言
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
printf( "I love fishc.com")
NameError: name 'printf' is not defined
(#) Sign indicates a comment.
Obtaining an Alt + P input
at an input acquisition Alt + N
>>> print(5+3) #计算
8
>>> print(21321443454542512423*444443235231111111)
9476171308734072151208806447810831953
>>> 5+3
8
>>> print("well water" + "river") #字符串拼接
well waterriver
>>> print("well water" + " river")
well water river
>>> print("I love fishc.com"*8) #打印八次
I love fishc.comI love fishc.comI love fishc.comI love fishc.comI love fishc.comI love fishc.comI love fishc.comI love fishc.com
>>> print("I love fishc.com\n"*8) #换行转义符
I love fishc.com
I love fishc.com
I love fishc.com
I love fishc.com
I love fishc.com
I love fishc.com
I love fishc.com
I love fishc.com
Chapter two
tab键
(1) indent
(2) prompt, such as prTAB will prompt all possible commands
indentation
Enter the correct position in the colon (:), IDLE will automatically indent the next line.
BIF
Built-in Function: built-in function
input the dir ( the builtins ) View All built-in functions Python, wherein the lower case is BIF
Help () function for displaying the description of the BIF