There are multiple ways to find the last index of a character in a string in python. One way is to use the rfind()
method.
main.py102 chars5 lines
Another way is to reverse the string and use the find()
method.
main.py128 chars5 lines
Both methods have their advantages and disadvantages, so choose the one that fits your needs best.
gistlibby LogSnag