Sign up for Free !!
World's first open source developer community with
Ticketing System
For example, if passed the following:
a = []
How do I check to see if a is empty?
a
if not a: print("List is empty")
Using the implicit booleanness of the empty list is quite pythonic.
list
Please Login/Register to write your answer !!!
Using the implicit booleanness of the empty
list
is quite pythonic.