I'm trying to create a list from a range, but when I stick it in another list I get a class and not the list of lists that I'm expecting - [[0,1,2]]
Code:
initial_list = range(3)
list_of_lists = [initial_list]
for i in list_of_lists:
print(i, type(i))
This outputs range(0,3), <class 'range'>
However, I want [[0,1,2]]
Does anyone know how to force range to expand?