>>> x = 1
>>> if x == 1:
... print('Yes')
Yes
* else 사용 예
* >>> x = 5
>>> if x > 6:
... print('Yes')
... else:
... print('No')
No
* elif 사용 예
* >>> x = 'A'
>>> if x == 'C':
... print(x)
... elif x != 'A':
... print('No')
... else:
... print(x)
A
----
* [[Python]]
{{tag>Python}}