Hi Friends, I have some confusion in python kindly help me. What is difference between these two statements
and
VS
??
1 2 3 4 5 |
word = [ 'xyz' , 'dsddf' , 'sdfs' ] for w in word: if len (w) > 3 : word.insert( 0 , w) |
1 2 3 4 |
word = [ 'xyz' , 'dsddf' , 'sdfs' ] for w in word: if len (w) > 3 : word.insert( 0 , w) |
1 2 |
for w in word: |
1 |
for w in word[:]: |