• 22 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: July 8th, 2023

help-circle



  • Sjmarf@sh.itjust.worksOPtoProgrammer Humor@programming.devSus
    link
    fedilink
    arrow-up
    101
    ·
    edit-2
    3 days ago

    not() is a base function that negates what’s inside (turning True to False and vice versa) giving it no parameter returns “True” (because no parameter counts as False)

    Actually, not is an operator. It makes more sense if you write not() as not () - the () is an empty tuple. An empty tuple is falsy in Python, so not () evaluates to True.