iterate through python string starting at index

Solutions on MaxInterview for iterate through python string starting at index by the best coders in the world

showing results for - "iterate through python string starting at index"
Anton
05 Jan 2018
1for i in range(start_pos, len(my_string)):
2   print(my_string[i])
3
Giorgio
25 Mar 2017
1def iter_starting_at(start_pos, string):
2    for i in range(start_pos, len(string)):
3        yield string[i]
4
5for character in iter_starting_at(start_pos, my_string):
6    print(character)
7