标签:back most mod not rac bsp 了解 erro file
1变量不用定义类型, 可以直接赋值
>>> a =5 >>> a 5 >>> a=‘hello‘ >>> a ‘hello‘
2 变量类型可以直接用type显示
>>> type(a) <class ‘str‘> >>> a=4 >>> type(a) <class ‘int‘>
3 print 可以打印数值,里面要有‘’ 或 “”
>>> print(a) 4 >>> print(‘hello‘) hello >>> print("hello") hello
错误示范:
>>> print(hello)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
print(hello)
NameError: name ‘hello‘ is not defined
标签:back most mod not rac bsp 了解 erro file
原文地址:https://www.cnblogs.com/mayplestory/p/11978762.html