How to print numbers in Python?
In Python, you can use the print() function to display numbers. For example:
x = 10
print(x) # 输出10
y = 3.14
print(y) # 输出3.14
z = 2 + 3j
print(z) # 输出(2+3j)
It is important to note that the print() function can accept multiple parameters, which will be output in the order they are given and separated by spaces. For example:
a = 1
b = 2
print(a, b) # 输出1 2