I have this code: the newlist is: [4,5,6,7,8] enter image description here
I want to have output like this : [4,5,6]
whats wrong with my code?