Why do I get index out of range?

Hello, I am just starting out python, and I know my question may be stupid. But, why am i getting this error? “IndexError: list index out of range”

def every_three_nums(start):
new_lst =
if start > 100:
return
else:
for i in range(start, 103, 3):
new_lst = new_lst[i]
return new_lst

def every_three_nums(start):
  new_lst = []
  if start > 100:
    return []
  else:
    for i in range(start, 103, 3):
      new_lst = new_lst[i]
  return new_lst

#Uncomment the line below when your function is done
print(every_three_nums(91))

I think this is the problem:

    for i in range(start, 103, 3):
      new_lst = new_lst[i]

new_list[i] is always out of range because new_list is empty. It also depends on itself which seems kind of wrong. This line basically says “empty list” = ith element of “empty list” which is out of range for i = 91. There is no 91th element. I hope I understood this correctly.

I solved this with append, however:

def every_three_nums(start):
  lst = []
  for i in range(start, 101, 3):
    lst.append(i)
  return lst

pay attention to 101 and not 103 otherwise you will get result up to 102! (Except, you add the if statement, like you did.)