摘要:
用户输入 使用input()函数可获取用户输入的文本,并以字符串的形式存入变量中。 注意:input括号内的语句只是输入提示,与input接收并存储进变量中的内容无关。 name = input("Please enter your name: ") print("Hello, " + name + 阅读全文
摘要:
遍历列表(for循环) 1、使用for循环打印列表中的元素 magicians = ['alice', 'david', 'carolina'] for magician in magicians: print(magician) 输出为: alice david carolina (1)临时变量m 阅读全文