What do you want to save?
Add Code snippet
New code examples
-
Go 2021-08-29 15:06:02
prints struct in custom format in golang
type T struct { a int b float64 c string } func (t *T) String() string { return fmt.Sprintf("%d____%g____%q", t.a, t.b, t.c) } func customFormat() { t := &T{ 7, -2.35, "abc" } fmt.Printf("%v\n", t) // output: 7___... Add solution -
Python 2021-08-29 13:58:01
python print table
Using format() function to print dict and lists Using tabulate() function to print dict and lists texttable beautifultable PrettyTable # pip install PrettyTable 1. Unformatted Fashion ## Python program to print the data d = {1: ["Python", 33.2,... Add solution