iu2 schrieb:
Hi all,I need to create a dictionary out of a list. Given the list [1, 2, 3, 4, 5, 6] I need the dictionary: {1:2, 3:4, 5:6}
dict(zip(l[::2], l[1::2])) Diez -- http://mail.python.org/mailman/listinfo/python-list
iu2 schrieb:
Hi all,I need to create a dictionary out of a list. Given the list [1, 2, 3, 4, 5, 6] I need the dictionary: {1:2, 3:4, 5:6}
dict(zip(l[::2], l[1::2])) Diez -- http://mail.python.org/mailman/listinfo/python-list