摘要:
# 函数input() 让程序暂停运行,等待用户输入一些文本。 # 获取用户输入后,Python将其存储在一个变量中,以方便你使用 message = input("Tell me something, and I will repeat it back to you: ") print(messa 阅读全文
posted @ 2023-02-06 11:31
Zoie_ting
阅读(57)
评论(0)
推荐(0)
摘要:
cars = ['audi', 'bmw', 'aubaru', 'toyota'] for car in cars: if car == 'bmw': print(car.upper()) else: print(car.title()) # and or age = 18 age_0 = 20 阅读全文
posted @ 2023-02-06 11:30
Zoie_ting
阅读(44)
评论(0)
推荐(0)
摘要:
bicycles = ["trek", "cannondale", "redline"] print(bicycles[0]) print(bicycles[0].title()) # 索引为-1,返回最后一个元素 print(bicycles[-1]) print(bicycles[-1].tit 阅读全文
posted @ 2023-02-06 11:30
Zoie_ting
阅读(23)
评论(0)
推荐(0)
摘要:
message = "hello world" print(message) message = "Let's go" print(message) # title()以首字母大写显示每个单词 name = "zhou yu ting" print(name.title()) name = "ZHO 阅读全文
posted @ 2023-02-06 11:29
Zoie_ting
阅读(31)
评论(0)
推荐(0)
浙公网安备 33010602011771号