Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 20, 2018 23:10
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/9e4e1fe5e77e47003171dfd4c7e79949 to your computer and use it in GitHub Desktop.
Save codecademydev/9e4e1fe5e77e47003171dfd4c7e79949 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