Skip to content

Instantly share code, notes, and snippets.

@ks--ks
Created August 2, 2020 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ks--ks/b1741ae84e101ec41174b12f1a6c393f to your computer and use it in GitHub Desktop.
Save ks--ks/b1741ae84e101ec41174b12f1a6c393f to your computer and use it in GitHub Desktop.
'''You have the following list of numbers:
n = [1,2,3,4,5,6]
Iterate over this list, printing out each list value multiplied by 10.'''
#Solution 1:
for x in n:
print (x * 10)
#Solution 2:
for x in range(len(n)):
print (n[x] * 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment