Do the format characters have to be specified? such as:
x = "Get rekt m8"
print "Eu disse: %r." % x
So why did not I have to specify this one and it worked for me?
hilarious = False
joke_evaluation = "Isn't that joke so funny?! %r"
Do the format characters have to be specified? such as:
x = "Get rekt m8"
print "Eu disse: %r." % x
So why did not I have to specify this one and it worked for me?
hilarious = False
joke_evaluation = "Isn't that joke so funny?! %r"
A string can be formatted at any time. The % character performs the formatting operation only when it is used as an operator. While this does not occur, the string in question can be manipulated and used without any problem.
Since Python 2.6, there is a more powerful way to format strings: