(elem)
return (
        isinstance(elem, string_types) or
        not isinstance(elem, collections.Iterable)
    )
True if an element is a single atom and false if it's a collection
True if an element is a single atom and false if it's a collection
True if an element is a single atom and false if it s a collection
def is_atomic(elem):
    """
    True if an element is a single atom and false if it's a collection
    """
    return (
        isinstance(elem, string_types) or
        not isinstance(elem, collections.Iterable)
    )
def is_atomic ( elem ) : return ( isinstance ( elem , string_types ) or not isinstance ( elem , collections . Iterable ) )