Linux gamer, retired aviator, profanity enthusiast

  • 3 Posts
  • 426 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle










  • AFAIK the syntax seems to be the same.

    def sayHam():
        print("Ham")
    
    sayHam()
    

    works when typed into the Python console, no class needed. I program as a hobby, I’m no expert on the language, but does Python even differentiate between functions and class methods internally? Other than just scope? There’s a possibility I’ll learn something today.