How To Split Up A List Of Lists Python?
I have a list of lists myList = [[1,2,3],[4,5,6],[7,8,9,10]] and I want to split it up into three separate list, each with their own name: a = [1,2,3] b = [4,5,6] c = [7,8,9,10]
Solution 1:
You could unpack it directly:
a, b,c= myList
Solution 2:
python is easy, you can do
a,b,c=mylist
Post a Comment for "How To Split Up A List Of Lists Python?"