How to Code a Game of Hangman… The EASY Way!! (Beginner Python Tutorial)

One of the most common introductory Python projects is to code a game of Hangman. Almost all of MIT’s introductory coding classes require you successfully program this fun little game.

Want to learn Python if you are an absolute beginner? Check out my in-depth beginner series:

In this video, I show you how to program a game of hangman that you can play on your computer. I randomly select a word from a list of words…

Similar Posts

22 thoughts on “How to Code a Game of Hangman… The EASY Way!! (Beginner Python Tutorial)
  1. **NOTE: in the words function, you should add a ".upper()" to "return word" so that everything is uppercased

    Update: lol i'm thinking about redoing this video. comment below if you think that's a good idea

    For more coding ideas, projects, and tutorials, be sure to subscribe! –>
    Source code:
    Follow me on Instagram:
    Follow me on Twitter:

  2. Followed your tutorial to make hangman with my daughter over lockdown. Great tutorial, well explained and straightforward design. Thanks!

  3. The video was great and very helpful as I am a beginner. I am using IDLE to write and run the script. When i run the module nothing happens. After searching I added following lines that helped me to run the script:
    def main():


    if _name_ == "__main__":


    Can you tell me how it runs for you without this? What am I missing?

  4. Great tutorial! But I have a question. So let's say you do not want to import the list (with words), but want to paste it in the same .py file,, How should i do that??

Leave a Reply

Your email address will not be published. Required fields are marked *