I believe you want a dictionary with a single key and a list:
l = [1,2,3,4,5]
d = {l[0]:l[1:]}
Output:
{1: [2, 3, 4, 5]}
0
solved Turning a list into a dictionary?
I believe you want a dictionary with a single key and a list:
l = [1,2,3,4,5]
d = {l[0]:l[1:]}
Output:
{1: [2, 3, 4, 5]}
0
solved Turning a list into a dictionary?