Strings In Depth8 / 17
Up next

Indexing gives a byte

package main

import "fmt"

func main() {
	s := "abc"
	// s[0] is the byte value 97
	fmt.Println(s[0])
	// %c formats it back to the character
	fmt.Printf("%c\n", s[0])
}
What you're solving

s[i] is a byte, not a character