Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def to_dict(keyy, valuee): #Turns input into dict and then puts to list
- total = tuple()
- my_dict = {}
- my_dict[value] = valuee
- my_dict[key] = keyy
- for each in my_dict:
- total.append(each)
- return total
- def main():
- more = ""
- while True:
- if more == "y":
- valuee = input("Name: ")
- keyy = input("Number: ")
- more = input("More data (y/n)? y ")
- if more == "n":
- break
- total = to_dict(keyy, valuee)
- print(total)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement