nowfound

Dev tools · February 7, 2016

HI

Hangman in 3 lines of Python

Just because you can, doesn

Hangman in 3 lines of Python launched on February 7, 2016 with 58 votes, #1,521 of 4,386 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 10 years on.

In plain words

Hangman in 3 Lines of Python is a minimalist implementation of the classic word-guessing game written in Python. It demonstrates how concise Python code can be by implementing a full Hangman game that pulls words from a system dictionary file. The project showcases Python's ability to accomplish complex tasks with remarkably few lines of readable code, making it useful for developers interested in elegant programming solutions or learning Python's expressive syntax.

written from the facts on this page · September 2026

From the sources

Yesterday, I was reminded of the /usr/share/dict/words file during a conversation I had at lunch. This file is simply a collection of valid words, and is present on all UNIX and UNIX-like systems. It can be a pretty useful resource for solving crossword puzzles or word jumbles. I had half an hour left for lunch, and so I thought about doing something cool with it. Without thinking too hard, I came up with the idea of implementing Hangman in Python. My first implementation was around a dozen lines of readable code, but already I could see how concise Python allowed me to be, and so I resolved to revisit the problem the next day from a code-golfer ’s point of view, and attempt to solve…from danverbraganza.com

Does a similar job

all alternatives →
  • Wordle2022 · powerlanguage.co.uk · ▲301

    A daily word game

  • It's like Hangman not Wordle2022 · foximax.com · ▲12

    Grey-haired back-end dev has a go at a web-based game using html/css/js only. The interface is (very) similar to Wordle, but it's a different game based on guess-the-word letter-by-letter Hangman.

  • Game where you write Python robots to fight other players2013 · robotgame.org · ▲142

    robotgame.org is for sale on Spaceship. Secure checkout and quick transfer. See all purchase options. No hidden fees.

  • Single-Instruction (Subleq) Programming Game2023 · jaredkrinke.itch.io · ▲86

    "Zachlike" single-instruction programming game

  • Dungeons and Data Structures 2021 · dnds.gocoder.one · ▲114

    Bomberman-like arena for bots coded in Python

  • DA
    dmangame - a python AI game2011 · okayzed.github.com · ▲48

    over the past couple months, i've picked up an old project around writing AI in python. the premise is to code a strategy for an AI player to use in a simplified RTS game. the AI basically takes the seat of a human player and the human codes its brain. main site: http://okayzed.github.com/dmangame/introduction.html app engine server and match archive that runs and hosts games: http://dmangame-app.appspot.com github: http://github.com/okayzed/dmangame more AI: http://github.com/okayzed/dmanai i'm looking for players, comments, ideas, etc - thanks!

More dev tools this month

the category →
  • /dev/null▲486

    a social network for devs

    Dev tools · 3d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 28d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 26d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 23d ago · openbot.run

  • Talanoa▲346

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 21d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 28d ago · corespeed.io

Source: Show HN post ↗

Launched alongside, February 2016

the whole month →