1
0

initial file upload

This commit is contained in:
mlot
2025-05-09 10:12:44 -04:00
parent 61bf543133
commit 40e9918df0
22 changed files with 215 additions and 1 deletions

22
chap3/cars.py Normal file
View File

@@ -0,0 +1,22 @@
cars = ['bmw', 'audi', 'toyota', 'subaru']
cars.sort()
print(cars)
cars.sort(reverse=True)
print(cars)
cars = ['bmw', 'audi', 'toyota', 'subaru']
print("\nHere is the original list:")
print(cars)
print("\nHere is the sorted list:")
print(sorted(cars))
print("\nHere is the original list again:")
print(cars)
cars.reverse()
print(cars)
length_cars = len(cars)
print(length_cars)