Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Truthy or Falsy Function
- def truthy_or_falsy(arg):
- """This function accepts a single argument and returns whether the argument is True or False (Truthy or Falsy)"""
- if arg == 0 or arg == "":
- return "Falsy"
- else:
- return "Truthy"
- argument = 3
- result = truthy_or_falsy(argument)
- print(f"The value {argument} is {result}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement