You are viewing a single comment's thread. Return to all comments →
When we print a binary or any number like:
print("{}".format(bin(12)))
The o/p we get is:
0b1100
So the given format is to exclude 0b. In your example: 0d for decimal.
Seems like cookies are disabled on this browser, please enable them to open this website
String Formatting
You are viewing a single comment's thread. Return to all comments →
When we print a binary or any number like:
print("{}".format(bin(12)))
The o/p we get is:
0b1100
So the given format is to exclude 0b. In your example: 0d for decimal.