I have a list of strings, e.g.
lst = ['2', '\n', '4', '\n', '\n']
I'm trying to determine the index point of the last string element that is not '\n'. In the above example the index point would be 2 as '4' is the last element whose value is not '\n'.
I can find the first occurance of '\n' easy etc:
lst.index('\n')
Is there a way to find the last occurance of an element that IS NOT of a particular string char?