+ 1
while loop + list.insert
words = [] i= (len(words)) while i<=(i+2): words.insert(i, (i+1)) print(words) ''' the output is " time limit exceed" ---- https://code.sololearn.com/c37QV1M6Z0n8/?ref=app
2 Answers
+ 8
https://code.sololearn.com/cQY47GU1F199/?ref=app
the variable i was never incremented/updated in the loop. It remained as 0, therefore the while loop never ended.
+ 1
yes, it's
thanks Jay