python打印多个变量_在Python中打印多个变量

python打印多个变量

Like other programming languages, In python also, we can define and print the multiple variables. Here, we see how can we print the single and multiple variables using the print() function?

像其他编程语言一样,在python中,我们也可以定义和打印多个变量 。 在这里,我们看到如何使用print()函数打印单个和多个变量?

In Python, single variable can be printed like this,

在Python中,可以这样打印单个变量,

print(variable)

Example:

例:

# Python program to print single variable
name = "Mike"
age = 21
country = "USA"

# printing variables one by one
print(name)
print(age)
print(country)
print() # prints a newline

# printing variables one by one
# with messages
print("Name:", name)
print("Age:", age)

你可能感兴趣的:(字符串,python,正则表达式,awk,机器学习)