def flatten_lists(nested):
'''
>>> flatten_lists([[0], [1, 2], 3])
[0, 1, 2, 3]
'''
list_of_lists = ([[0], [1, 2], 3])
List_flat = []
for i in range(len(list_of_lists)):
for j in range (len(list_of_lists[i])):
List_flat.append(list_of_lists[i][j])
return List_flat
I want to flatten the list [[0], [1, 2], 3]
but I'm getting error:
TypeError: object of type 'int' has no len()
how to solve this