micropython/tests/basics/bool1.py

18 wiersze
246 B
Python
Czysty Zwykły widok Historia

# tests for bool objects
# basic logic
print(not False)
print(not True)
print(False and True)
print(False or True)
# unary operators
print(+True)
print(-True)
# unsupported unary op
try:
len(False)
except TypeError:
print('TypeError')