access characters in string python

Solutions on MaxInterview for access characters in string python by the best coders in the world

showing results for - "access characters in string python"
Ana Paula
30 Nov 2019
1>>> s = 'foobar'
2
3>>> s[0]
4'f'
5>>> s[1]
6'o'
7>>> s[3]
8'b'
9>>> len(s)
106
11>>> s[len(s)-1]
12'r'
13