2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00
cheat.sheets/sheets/_python/loops

14 lines
143 B
Plaintext
Raw Normal View History

2017-07-18 04:49:56 +00:00
# Basic
if x > 0:
print(x)
else:
print(-x)
# if else
if x > 0:
print(x)
elif x == 0:
print(420)
else:
print(-x)