登录
转载

Python 3基础教程7-if语句

发布于 2021-06-04 阅读 329
  • Python
转载

前面文章介绍的循环语句,这里开始介绍控制语句。直接看下面的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')

评论区

莲子
4粉丝

励志做一条安静的咸鱼,从此走上人生巅峰。

0

0

0

举报