Programming, Python, Introduction.
list_length = len(my_list) print("The number of elements in the list is:", list_length) Example 3: Determining the Length of a Dictionary # Determining the length of a dictionary my_dict = {'a': 1, 'b': 2, 'c': 3} dict_length = len(my_dict) print("The number of key-value pairs in the dictionary