3-1
names = ["321","456","789"]
print (names)
for i in names:
print(i)
3-5
names = ["321","456","789"]
no = names.pop();
print(no + "cant come")
names.append("110")
print(names)
print( i + ", please come ")
3-7
names = ["A","B","C"]
print ("I find a bigger deskmmmmmm")
names.insert(0,"D")
names.insert(2,"E")
names.append("F")
for i in names:
print(i + " please com e")
3-8
place = ["c","a","b","d","e"]
print(place)
print(sorted(place))
print(place)
print(sorted(place,reverse=True))
print(place)
place.reverse()
print(place)
place.reverse()
print(place)
place.sort()
print("\n")
print(place)
place.sort(reverse=True)
print(place)
print(len(place))
output:
['c', 'a', 'b', 'd', 'e']
['a', 'b', 'c', 'd', 'e']
['c', 'a', 'b', 'd', 'e']
['e', 'd', 'c', 'b', 'a']
['c', 'a', 'b', 'd', 'e']
['e', 'd', 'b', 'a', 'c']
['c', 'a', 'b', 'd', 'e']
['a', 'b', 'c', 'd', 'e']
['e', 'd', 'c', 'b', 'a']
5