I have the following code:
lst = [1,2,3,4]
a = 0
i = 0
for i in lst:
while a < len(lst):
a += 1
print(a, i)
And I'd like it to print
1 1
2 1
3 1
4 1
1 2
2 2
3 2
4 2
1 3
2 3
3 3
4 3
1 4
2 4
3 4
4 4
However, I am struggling to achieve this. I can only get it to print the first item in the list.
1 1
2 1
3 1
4 1
Any help would be appreciated. Thanks