<reponame>myarist/Codecademy<filename>Data Scientist Career Path/3. Python Fundamentals/5. Python List/5. Challenge (Advanced)/4. double index.py
#Write your function here

def double_index(lst, index):
  # Checks to see if index is too big
  if index >= len(lst):
    return lst
  else:
    # Gets the original list up to index
    lst[index] *= 2
  return lst


#Uncomment the line below when your function is done
print(double_index([3, 8, -10, 12], 2))
Scientist Career Path/3. Python Fundamentals/5. Python List/5. Challenge (Advanced)/4. double index.py
#Write your function here

def double_index(lst, index):
  # Checks to see if index is too big
  if index >= len(lst):
    return lst
  else:
    # Gets the original list up to index
    lst[index] *= 2
  return lst


#Uncomment the line below when your function is done
print(double_index([3, 8, -10, 12], 2))
#Write your function here # Checks to see if index is too big # Gets the original list up to index #Uncomment the line below when your function is done