Hello and thank you for looking at my post. I am very new to programing and python and am doing exercises from http://www.practicepython.org/solution/2...tions.html . I am on exercise 3. and I have completed the first task however it is asking for me to convert the result of the if statement back into a list. Here is the code I have so far.
a = [1,1,2,3,5,8,13,21,34,55,89] for element in a: if element <= 4: print (element)I need to figure out how to turn the result into a list. I have tried the list function by doing: print list(element) and that threw a syntax error. I have tried it a few other ways all of which have given me syntax errors. I have watched many list tutorials on YouTube and have come here as a last resort. Please forgive me for any errors in my post format and I appreciate all help very much. P.S I am running Python 3