Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import string
- def populate_list(initial_list):
- while True:
- value = input("Enter value to be added to list: ")
- if value.lower() == "exit":
- return initial_list
- initial_list.append(value)
- def triple_list(initial_list):
- new_list = initial_list * 3
- return new_list
- initial_list = []
- populate_list(initial_list)
- new_list = triple_list(initial_list)
- for items in new_list:
- print(items)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement