Python Quations
Python Quations
Python
add = lambda x, y: x + y
Python
try:
result = 10 / 0
except ZeroDivisionError:
else:
print("Division successful")
finally:
print("Execution completed")
Python
def my_decorator(func):
def wrapper():
func()
return wrapper
@my_decorator
def say_hello():
print("Hello!")
say_hello()
Python
import datetime
now = datetime.datetime.now()