+ 1
How to specify a certain range of character in a list of words in list
Ex .. [anna,bob,links] Output if x=2 means last two words in the list of words [na,on,ks]
3 odpowiedzi
+ 2
lst = ["anna", "bob", "links"]
print([word[-2:] for word in lst])
+ 2
Karthik Devillers,
Just giving you a hint, for future reference. You can edit the original question if there was a typo, or need to add/change something. You don't have to write in answers section.
+ 1
Ob have to come its by mistake..I have typed on