0
How to code python to print words from my list L with 5 letters only using for and len?
L = ['first', 'second', 'third', 'fourth', 'fifth']
4 ответов
+ 4
L = ['first', 'second', 'third', 'fourth', 'fifth']
for word in L:
#print(word[:5]) # this works too
if len(word) == 5: print(word)
+ 4
u can also try this :
https://code.sololearn.com/c4j28TShiA7y/?ref=app
+ 1
Thx to Ipang, he competely imderstood and resolve my problem with using for and len. I had to primt just 5 letter words, first, third, fifth, not secon and fourt. Thx again! We'll be in touuch.
0
sorry, understood