How to print degree symbol in python?
Degree symbol is very useful in mathematic operations and used to write temperatures.
Here we’ll see how to print degree symbol in python.
e.g.,
degree_sign = u"\N{DEGREE SIGN}" print(degree_sign)
e.g., using chr(176)
print("100",chr(176)) print("10",chr(176),sep='')
e.g.,
a = '\u00b0' print(a)
In this way we can print degree symbol in python.
Subscribe
Login
Please login to comment
0 Discussion