A Simple Hangman Game Implemented In 3 Lines Of Python

Short Bytes: Today I’m sharing a clever implementation of Hangman in python by programmer Danver Braganza. Take a look at this 3-lines-long program and try to make it more compact.

You might have come across Python scripts teaching you how to code the classic game “Hangman”. For those who don’t know, it’s a word guessing game for two or more players. In the game, one player thinks of a word or a phrase and the other player tries to suggest letters or numbers within some fixed number of guesses.

When I came across a neat, small, working, fun implementation of Hangman on Hacker News, I decided to share it with fossBytes readers as it’s one of my favorite word games. Coder Danver Braganza decided to address the standard limit of 80 characters a line and write his hangman program in Python.