[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/magic-coder/Python/master/python5/If.md [Back]  [Original]

#  #

Python  True  False 

Python  0 null True0  null False



![if](http://upload-images.jianshu.io/upload_images/2136918-4ee2486190450a1a?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

## 1if  ##

Python if 

```python
if 
    
else
    
```

Python  `:` 

if >==60:
    print ('')
else :
    print ('')

```



```txt

```

 list TrueFalse

```python
num = 6
if num :
    print('Hello Python')
```

## 2if  ##

 60  90  80  90 

 if 



```python
if 1:
    1
elif 2:
    2
elif 3:
    3
else:
    4
```



```python
# -*-coding:utf-8-*-

results = 89

if results > 90:
    print('')
elif results > 80:
    print('')
elif results > 60:
    print ('')
else :
    print ('')

```



```txt

```

## 3if  ##

Python  Java  switch  elif  or  and 

```python
# -*-coding:utf-8-*-

java = 86
python = 68

if java > 80 and  python > 80:
    print('')
else :
    print('')

if ( java >= 80  and java < 90 )  or ( python >= 80 and python < 90):
    print('')

```



```txt


```

if  and  or  >

Web Proxy Viewer  |  New URL  |  Original Page