I am trying to create multiple lists from a dictionary. For example:
dict_ = {'one': 1, 'two': 2, 'three': 3, 'four': 4}
list_1 = [k for k, v in dict_.items()]
list_2 = [v for k, v in dict_.items()]
The above works but I am trying to find out if there is a single liner that would create both list_1 and list_2 instead of repeating the same "for" loop twice?