改变工作环境
import os
os.chdir("I:\\pythonwork")
os.getcwd()
'I:\\pythonwork'
for循环
cities = ["beijing","shanghai","guangzhou"]
for city in cities:
print(city)
if语句
animals = ["cat","mouse","rabbit"]
if "cat" in animals:
print("yes")
else:
print("no")