python写一个条件语句
时间: 2023-10-10 11:11:56 浏览: 64
以下是一个简单的条件语句示例:
```
x = 10
if x > 5:
print("x is greater than 5")
else:
print("x is less than or equal to 5")
```
在这个例子中,如果x的值大于5,则会输出“x is greater than 5”,否则将输出“x is less than or equal to 5”。
阅读全文