Alle Dateien aus dem Pythonkurs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
441 B

from namen import namen
### String nach Boolean
print('String nach Boolean')
print(bool('True')) # ist True
print(bool('Test')) # ist True
print(bool('False')) # ist True
print(bool('')) # ist False
### int nach Boolean
print('int nach Boolean')
print(bool(0)) # ist False
print(bool(1)) # ist True
print(bool(2)) # ist True
### List nach Boolean
print('List nach Boolean')
print(bool(namen)) # ist True
print(bool([])) # ist False