python if判断

#!/usr/bin/python
#coding=utf-8
#好好学习,天天向上
cars=['audi','bmw','toyota','subaru']
for car in cars:
    if car == 'bmw':
       print(car.upper())
    else:
        print(car.title())

  

 

posted @ 2021-01-03 21:02  tigergaonotes  阅读(41)  评论(0编辑  收藏  举报