names = []
for i in range(3):
names.append(input(f"Add Name {i+1}: "))
names.sort(key=lambda x: len(x))
print("Names in order of length: ")
for name in names:
print(name)
users = {}
for i in range(3):
name = input(f"Add Name {i+1}: ")
users[name] = int(input(f"Enter Age in Years: "))
for i in list(users.keys()).sort(key = lambda x: len(x)):
pass
option = int(input("Type 1 to print all users by name length, and type 2 to print by age: "))
if option == 1:
pass
else:
pass
{'shd': 243, 'fhfj3': 23, 'jgj': 34}