[Solved] Is there a way to declare all the values in the list as a list individually in python [closed]


loop through and create

for item in a:
    item = []

or you can use list comprehension

a = [[] for item in a]

if your intended output is [[i], [j], [k]] then use

a = [[item] for item in a]

solved Is there a way to declare all the values in the list as a list individually in python [closed]