How to use Numeric literals in Python?

PHOTO EMBED

Wed May 12 2021 13:17:18 GMT+0000 (Coordinated Universal Time)

Saved by @zircon

a = 0b1010 #Binary Literals
b = 100 #Decimal Literal 
c = 0o310 #Octal Literal
d = 0x12c #Hexadecimal Literal

#Float Literal
float_1 = 10.5 
float_2 = 1.5e2

#Complex Literal 
x = 3.14j

print(a, b, c, d)
print(float_1, float_2)
print(x, x.imag, x.real)
content_copyCOPY

https://www.programiz.com/python-programming/variables-constants-literals