Answers for "dict key and item to list"

2

create dictionary key and values from lists

keys = ['a', 'b', 'c']
values = [1, 2, 3]
dictionary = dict(zip(keys, values))
print(dictionary) # {'a': 1, 'b': 2, 'c': 3}
Posted by: Guest on September-14-2021
-3

dict keys to list

newlist = list()
Posted by: Guest on May-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language