+ 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
1 ответ
+ 1
Thanks. It is a useful debugging tip 🤓.
https://stackoverflow.com/questions/14680255/difference-between-fmt-println-and-println-in-go