How do I check if a list is empty?

if not a:
  print("List is empty")

Using the implicit booleanness of the empty list is quite pythonic.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)