raise exception 1
This commit is contained in:
parent
eae541298b
commit
348bb4542b
9
python-temel/raise.exception.py
Normal file
9
python-temel/raise.exception.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user