Python输入输出
输出
print() 用来把结果显示出来。
print("hello")输入
input() 用来接收用户输入。
name = input("请输入名字:")input() 返回的是字符串,如果要数字,需要用 int() 或 float() 转换。
print() 用来把结果显示出来。
print("hello")input() 用来接收用户输入。
name = input("请输入名字:")input() 返回的是字符串,如果要数字,需要用 int() 或 float() 转换。