So,
I have a list of random elements lst1 = [1,"random",67,9,32,7.6,5/2]
when I loop over it to remove all it's elements ,I Get this Output ['random', 9, 7.6]
this is what i did :
for i in lst1 :
lst1.remove(i)
print(lst1)
In Second case When I do the same with this syntax
for i in lst1[:]:
lst1.remove(i)
It removes all elements -> []
Can someone tell me what's really happening in both the cases And why it doesn't remove all elements in first case