menu.py (383B)
1 import merge 2 import bubble 3 4 5 while True: 6 list = [] 7 inp = "" 8 print("enter nums, then enter END") 9 while inp != "END": 10 inp = input("number: ") 11 if inp != "END": 12 list.append(inp) 13 14 sort = int(input("1) bubble, 2) merge: ")) 15 16 if sort == 1: 17 print(*merge.sort(list), sep=", ") 18 19 else: 20 print(*bubble.sort(list), sep=", ")