Solution for "python get string at index"

string='mississippi' s='s' lst= [] for i in range(len(string)): if (string[i] == s): lst.append(i) print(lst) #result: [2, 3, 5, 6]

python3 return a list of indexes of a specific character in a string

Similar codes for "python get string at index"


Latest 'Python' questions

Added before "python get string at index"