grandfathermagic

string to list - week3 - list methods

Apr 29th, 2020
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. # Just throw numbers or laters combined and it will separate each one of them to it own index
  2.  
  3. user_input = list(input("Write down the list of numbers - no need for comme or []  "))
  4. number = user_input
  5. i = (len(number)) -1
  6. out_put_list = []
  7. while  i >= 0:
  8.     pop_result = number.pop(i)
  9.     out_put_list.append(pop_result)
  10.     i -= 1
  11.  
  12. print(out_put_list)
Advertisement
Add Comment
Please, Sign In to add comment