PythonBasic checks: sign, zero, empty, nullDifficulty 1/3
class InsufficientFunds(Exception):
pass
def withdraw(account, amount):
if amount > account.balance:
raise InsufficientFunds()
account.balance -= amount
return account.balance