Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. #Truthy or Falsy Function
  2. def truthy_or_falsy(arg):
  3.     """This function accepts a single argument and returns whether the argument is True or False (Truthy or Falsy)"""
  4.     if arg == 0 or arg == "":
  5.         return "Falsy"
  6.     else:
  7.         return "Truthy"
  8. argument = 3
  9. result = truthy_or_falsy(argument)
  10. print(f"The value {argument} is {result}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement