if语句

# 第五章
# if语句

# 1.基本示例
cars = ['audi', 'bmw', 'subaru', 'toyota']

for car in cars:
    if car == 'bmw':
        print(car.upper())
    else:
        print(car.title())

 

posted @ 2018-04-22 20:13  iameng  阅读(107)  评论(0)    收藏  举报