Olusanwo Isaac, why don't you consider using if statements because [2,2] isn't Fibonacci. Also, appending just the even numbers will cause an index error. Here's how I can help:
a, b = 0, 1
for i in range(30):
if b%2 == 0:
a, b = b, a+b
range(2,400000) cause Error in list indexes. Initially you have 2 elements indexes 0,1 but so list1 produce error.
Take range(40000) only... (means From 0)
and also list[2,2] will result wrong output for fibonacii. take list1[0,1] instead.
list1 = [1, 2]
for i in range (40):
el = list1[i] + list1[i+1]
Julia Shabanova initially first numbers are 0,1,1,2,3,5...
So 2,2 is not correct. But if we want as 2,2 then its our wish..