numbers = (1,2,3)
元组里面的项目不可以修改(用圆括号)
coordinates = (1,2,3) x,y,z = coordinates print(x,y,z)
>>1 2 3
customer = { "name" : "John smith", "age" : 30, "is_verified":True } print(customer["name"])
>> John smith
message = input (">") words = message.split(‘ ‘) print(words)
>Good morning
["Good" , "morning"]
def greet_user(): print(‘Hi there!‘) print(‘Welcome aboard‘) print(‘Start‘) greet_user() print("Finish")
函数后面需要空两行
原文:https://www.cnblogs.com/zuotianmeichifan/p/12110045.html