Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 23, 2018 12:44
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 codecademydev/d0e965814620ed8c808f9f9111784316 to your computer and use it in GitHub Desktop.
Save codecademydev/d0e965814620ed8c808f9f9111784316 to your computer and use it in GitHub Desktop.
Codecademy export
#Write your function here
def double_index(lst, index):
if index < len(lst):
lst[index] = lst[index] * 2
return lst
#Uncomment the line below when your function is done
print(double_index([3, 8, -10, 12], 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment