Provided that I have a Python list of strings of words, how do I get absolute position of a given word in the whole list, as opposed to relative position within the string?
l = ['0word0 0word1 0word2', '1word0 1word1 1word2', '2word0 2word1']
rel_0word2 = l[0].split().index('1word2') # equals 2
abs_0word2 = ??? # equals 5
Thanks in advance.
Not sure on what you mean on absolute position, please find below my sample:
Or:
And the shortest one: