For example, if passed the following:
a = []
How do I check to see if a
is empty?
Answer
if not a:
print("List is empty")
Using the implicit booleanness of the empty list
is quite pythonic.
For example, if passed the following:
a = []
How do I check to see if a
is empty?
Answer
if not a:
print("List is empty")
Using the implicit booleanness of the empty list
is quite pythonic.
In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...
No comments:
Post a Comment