您的位置:首页 > 编程语言 > Python开发

Python 3基础教程7-if语句

2017-05-05 22:09 375 查看
前面文章介绍的循环语句,这里开始介绍控制语句。直接看下面的demo.py例子

# 这里介绍 if语句

x = 5
y = 8
z = 4
s = 5

if x < y:
print('x is less than y')

if x < y > z:
print('x is less than y and greater than z')

if x <= s:
print('x is less than or equal to s')
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: