str1 = "I am happy" print(str1[0]) # I print(str1[1]) # (whitespace) print(str1[2]) # a print(str1[3]) # m print(str1[4]) # (whitespace) print(str1[5]) # h print(str1[6]) # a print(str1[7]) # p print(str1[8]) # p print(str1[9]) # y
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter