Here is an example of a list that I would like to convert into a list of lists in python:
p=[1,2,3,4]
I wrote the following code to address the problem:
u=[]
v=[x for x in p]
u.append(v)
my result: [[1,2,3,4]]
Result I would like to have: **[[1],[2],[3],[4]]**
Any suggestions? thanks.