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.
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...
No comments:
Post a Comment