子曰:学而时习之,不亦说乎
变量好比一个"容器",可以存储与之相关联的东西。
message = "Hello Python world!"
print(message)
上述代码中message
就是一个“容器”,而"Hello Python world!"
就是需要存储的数据,通过print()
方法可以把容器里的东西展示打印出来。
- | ||||
---|---|---|---|---|
False | class | finally | is | return |
None | comtinue | for | lambda | try |
True | def | from | nonlocal | white |
and | del | global | not | with |
as | elif | if | or | yield |
assert | else | import | pass | |
break | except | in | raise |
- | ||||
---|---|---|---|---|
abs() | divmod() | input() | open() | staticmethod() |
all() | enumerate() | int() | ord() | str() |
any() | eval() | isinstance() | pow() | sum() |
basestring() | execfile() | issubclass() | print() | super() |
bin() | file() | iter() | property() | tuple() |
bool() | filter() | len() | range() | type() |
bytearray | float() | list() | raw_input() | unichr() |
callable | format() | locals() | reduce() | |
chr() | frozenset() | long() | reload() | vars() |
classmethod | getattr | map() | repr() | xrange() |
cmp() | globals() | max() | reversed() | zip() |
compile() | hasattr() | memoryview() | round() | import() |
complex() | hash() | min() | set() | apply() |
delattr() | help() | next() | setattr() | buffer() |
dict() | hex() | object() | slice() | coerce() |
dir() | id() | oct() | sorted() | intern() |
原文:https://www.cnblogs.com/mo-he/p/10869308.html