For example, if passed the following:
a = []
How do I check to see if a is empty?
a
len() is an O(1) operation for Python lists, strings, dicts, and sets. Python internally keeps track of the number of elements in these containers.
len()
JavaScript has a similar notion of truthy/falsy.