How is my submit and tests run showing different output ?

Just look at the image. There are no global variables as well...
image
Full Code

func mostCommonWord(paragraph string, banned []string) string {
    tl1 := strings.ToLower(paragraph)
    re := regexp.MustCompile(`[,!.&\/\\#,+()$~%'":;*?<>{}]`)
    tl := re.ReplaceAllString(tl1, " ")
    // fmt.Println(tl)
    sp := regexp.MustCompile(` +`).Split(tl, -1)
    // fmt.Println(sp)
    // sp := strings.Split(tl, " ")
    m := make(map[string]int)
    for i:=0; i < len(sp); i++ {
        m[sp[i]]++
    }
    // fmt.Println(m)
    for i:=0; i < len(banned); i++ {
        delete(m, banned[i])
    }
    // fmt.Println(m)
    var max int
    var maxs string
    for i,v := range m {
        if max < v {
            max = v
            maxs = i
        }
    }
    return maxs
}
Comments (1)