K KristanC Honorary Poster Apr 12, 2020 #1 Hello po for i in range(5) print(i) That's a normal loop but I want my output be stored into a list like this [1,2, 3,4] Is there a way everytime I tried to execute my code I got this result [1] [2] [3] [4]
Hello po for i in range(5) print(i) That's a normal loop but I want my output be stored into a list like this [1,2, 3,4] Is there a way everytime I tried to execute my code I got this result [1] [2] [3] [4]
A angelofmercy Enthusiast Apr 14, 2020 #3 assign ka muna ng list mo sir li = [] sa halip na print(i) sir, append(i) li.append(i)