Inputs:
x,y,z = 1,2,3
Expected Output:
some_dict = {'x': 1, 'y': 2, 'z': 3}
Current code:
x,y,z = 1,2,3
some_list = [x,y,z]
some_dict = {}
def convert(some_list):
for i in some_list:
some_dict[i.__name__ ] = i
convert(some_list)
Error:
some_dict[i.__name__ ]= i
AttributeError: 'int' object has no attribute '__name_