raise exception 1

This commit is contained in:
Mert Gör 🇹🇷 2023-08-20 14:33:03 +03:00
parent eae541298b
commit 348bb4542b
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,9 @@
def banner(text):
if not isinstance(text, str):
raise TypeError
print('-' * len(text))
print(text)
print('-' * len(text))
banner('ankara')
banner(100)