Few days ago, in my exam I had this question: 4. Rewrite the following code without if statement. The code should be single line. (without using any other loops)
If not flora and fauna:
return True
else:
return False
I could not answer for this question but still it seems very interesting/strange for me since I'm not pro in python. I have tried a lot of ways like extend()
function but still don't know how to do this.
Any ideas or hints?
EDIT: I framed the question wrongly. Sorry for this. Since I do not have much experience I thought this problem can be solved only by making lists.