python基础①

改变工作环境

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")
上一篇:癌症免疫系列(2)


下一篇:癌症免疫系列(6)