Python3笔记009

第2章 python语言基础

  • 2.1 python语法特点
  • 2.2 保留字与标识符
  • 2.3 变量
  • 2.4 数据类型
  • 2.5 运算符
  • 2.6 输入和输出

2.6 输入和输出

1、input()函数

name = input("请输入姓名:")
age = int(input("请输入年龄:"))

2、print()函数

print(6)
print("name")
print(a if a>b else b)
原文地址:https://www.cnblogs.com/infuture/p/13184231.html