Answers for "python find last node"

3

find last appearance python

>>> s = 'hello'
>>> s.rfind('l')
3
Posted by: Guest on October-02-2020
1

python print last 3

message = iloveyouchina
#get last x words
#for example x = 3
print(message[-3:]
Posted by: Guest on July-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language