Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Thorw a list numbers or elements separated by space and i will return it as a reverse list
- user_input = input("Enter a list numbers separated by space ")
- user_input = user_input.split()
- print(type(user_input))
- number = user_input
- i = (len(number)) -1
- out_put_list = []
- while i >= 0:
- pop_result = number.pop(i)
- out_put_list.append(pop_result)
- i -= 1
- print(out_put_list)
Advertisement
Add Comment
Please, Sign In to add comment