Given:
x = ['w', 'e', 's', 's', 's', 'z','z', 's']
Each occurrence of s
appears at the following indices:
1st: 2
2nd: 3
3rd: 4
4th: 7
If I do x.index('s')
I will get the 1st index.
How do I get the index of the 4th s
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…