python编程从入门到实践

2017.5.3 sort test

2017-05-16  本文已影响2人  LorryZ

travel = ['Britain','Germany','America','Swiss','Japan']

print(travel)

print(sorted(travel))

print(travel)

print(sorted(travel,reverse=True))

print(travel)

travel.reverse()

print(travel)

travel.reverse()

print(travel)

travel.sort()

print(travel)

travel.sort(reverse = True)

print(travel)

print(travel[-1])

上一篇下一篇

猜你喜欢

热点阅读