+ 2

Did you know that print is included in Go?

In my final course project I used "print" to output the result. All test cases failed without errors, although my results matched the expected results. After I switched to "fmt.Println", all test cases passed. Considering Sololearn displayed my output, clearly it sees what my code outputs, so not accepting it is a bug and I reported it. But know that while "print" is included in Go, without being required to import anything, it actually outputs to stderr. It's also not guranteed to stay in the language. So beware. 😁 Demo: https://code.sololearn.com/cck4EAahtpyC/ Details: https://pkg.go.dev/builtin@master#print

22nd Sep 2022, 9:44 PM
Nicolae Crefelean
Nicolae Crefelean - avatar
1 Resposta
22nd Sep 2022, 10:24 PM
Bob_Li
Bob_Li - avatar