wie man die nächste 5 Iteration in Python überspringt
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
skipcoun
Quaint Quail