Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #We provide you with a number N.
- #Create a list then, using a loop, populate the list with N elements. Set each list element to the index multiplied by 10.
- #Beware: we might pass in a value 0, in which case you should return an empty list.
- # my code
- # Get N from the command line
- import sys
- N= int(sys.argv[1])
- List = []
- for x in range(0, N):
- List.append(x * 10)
- x += 1
- print(List)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement