Since I started learning python a few months back, I have been mesmerized about how with the simple code you could achieve complex tasks.
So, I have been trying to do something like this,
list = [1,2,3,4]
statement = ''
if len(list) > 4:
statement = '[x for x in list if x%%2 == 0]'
else:
//do something else
I know this won't work as statement above is just a string, but I hope you get the idea of what am trying to do and hope you could suggest how I should go about it.