Advertisement
aneliabogeva

Multiply a List of Integers

Jun 14th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. values = input()
  2. items = values.split(" ")
  3. list =[]
  4. list_result = []
  5. p = int(input())
  6. miltiplay = 0
  7.  
  8. for i in items:
  9. list += [int(i)]
  10.  
  11. for j in list:
  12. miltiplay = p * int(j)
  13. list_result.append(miltiplay)
  14. print(f"{miltiplay}",end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement