golang string to array
package main
import (
"fmt"
"strings"
)
func main() {
// Step 1: Declare a string variable
str := "Hello, World!"
// Step 2: Use the strings.Split function to convert the string to a slice of strings
strArray := strings.Split(str, "")
// Step 3: Print the resulting slice
fmt.Println(strArray)
}