# coding=UTF-8
# sort ĸ˳иģ ͨreverse = True ĸ

cars = ['bmw', 'adui', 'benz','toyota','subaru']
cars.sort()
print(cars)

cars.sort(reverse = True)
print(cars)

# sorted бʱ
cars = ['bmw', 'adui', 'benz','toyota','subaru']
print(sorted(cars))
print(sorted(cars,reverse = True))
# ԭб˳򲻱
print(cars)


# бת
print("\n")
print(cars)
cars.reverse()
print(cars)
print(len(cars))

cars = ['bmw', 'adui', 'benz','toyota','subaru']
for car in cars:
    if car == 'bmw':
        print(car.upper())
    else:
        print(car.title())
        
car ='bmw'
if(car == 'bmw'):
    print('Ture')
else:
    print('false')
if(car =='BMW'):
    print('Ture')
else:
    print('false')
if(car =='audi'):
    print('Ture')
else:
    print('false')

    
