list comprehension fibonacci code example
Example: fibonacci series list comphrehension in python
n=10
mylist=[0,1]
[mylist.append(mylist[-2]+mylist[-1]) for n in range(n)]
print(mylist)
n=10
mylist=[0,1]
[mylist.append(mylist[-2]+mylist[-1]) for n in range(n)]
print(mylist)