Can the str.format() method print boolean arguments without header lines?
I cannot use str(myVar).lower() as a format argument, because I want to keep case letters when myVar not logical.
Please do not submit solutions with conditional checks of variable values.
All that interests me is the ability to write the following:
"Bla bla bla {}".format(myVar)
so the output will be "Bla bla bla true" when myVar == True and "Bla bla bla false" when myVar == false
source share