cornsnake.util_dict

Functions for working with Python dictionaries (dict or {}).

Documentation

 1"""
 2Functions for working with Python dictionaries (dict or {}).
 3
 4[Documentation](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_dict.html)
 5"""
 6
 7
 8def get_keys(dictionary: dict) -> list[str]:
 9    """
10    Get the keys of the given dictionary (dict) as a list of strings.
11    """
12    return [*dictionary]
def get_keys(dictionary: dict) -> list[str]:
 9def get_keys(dictionary: dict) -> list[str]:
10    """
11    Get the keys of the given dictionary (dict) as a list of strings.
12    """
13    return [*dictionary]

Get the keys of the given dictionary (dict) as a list of strings.