Fibonacci Python — unexpected additional output “None”, in the end
Hi lovely people, how are you todayyyy 💛💙 😄 🐍I’ve got a specific question: This code below almost works — i do get the desired output..but i also get an annoying “None”, as an additional output in the end. And i don’t know how to make it go away. So my output is: 0 1 1 2 3 None If I make the “None” go away, SoloLearn will accept it. And my code is: num = int(input()) def fibonacci(n): #complete the recursive function fibolist = [0, 1] for i in range(n): if i>=2: fibolist.append(fibolist[i-2] + fibolist[i-1]) for el in fibolist: print(el) print(fibonacci(num)) 🤔Any ideas? Please do NOT post your solution in this thread — there are many Fibonacci Python threads in SoloLearn already. This is a specific question, which might help users who have also seen this situation elsewhere. So why is the “None” there? Thank you 🙏😊