Advertisement
aneliabogeva

Integer Insertion

Jun 20th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. nums = [int(item) for item in input().split(" ")]
  2. command = input()
  3.  
  4. while command != "end":
  5. num = command
  6. index_num = num[0]
  7. nums.insert(int(index_num), int(num))
  8. command = input()
  9.  
  10. for i in nums:
  11. print(i, end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement