print('hello,world')
...
>>> hello()
hello,world
参数
定义函数时()里面的参数是形参,输入的值为实参,下面的列子中hello(x)为形参,7为实参
>...x,y: x+y,[1,3,5],[10,20,30]))
[11, 23, 35]
字典
在python中,字典是一系列的键值对,每个键都与一个值相关联,可以用键来访问对应的值,与键相对应的可以是数字...things)
['red', 'yellow']
['round', 'square']
for key in apple.keys():
print(key)
color
shape
在字典中包含字典...: file: 必需,文件路径(相对或者绝对路径)。...也就是说,新的内容将会被写入到已有内容之后。