Click here to Skip to main content
15,949,686 members

Comments by johng92 (Top 1 by date)

johng92 12-Aug-22 2:46am View    
I found this one:

skipcount = -1
song = ['always', 'look', 'on', 'the','bright','side','of', 'life']
for sing in song: 
    if sing == 'look' and skipcount <= 0: 
        print (sing) 
        skipcount = 3 
    elif skipcount > 0: 
        skipcount = skipcount - 1
        continue 
    elif skipcount == 0:
        print ('a' + sing)
        skipcount = skipcount - 1
    else: 
        print (sing)


this one I found in the internet , But I am not able to understand. from which side it is skip counting , from which side.