Share your repls and programming experiences

← Back to all posts
Hangman ONE LINER **WORKING** (1 line series)[no3]
rafrafraf (1369)

can you truly make hangman in python in one line?

In order to answer this question you need the following:

  • adderall

You do not want to know how difficult this was.
But yes it is achievable

character count: 1790

no semi-colons this is a true one liner

I dont even know where to start explaining all the problems that this challenge brought up but it helped me think of multiple new ways to solve one liner problems

P.S this took me roughly 8 hours to make, did it all today with one break

What should i should i make in 1 line next >:)

EDIT: it's been less than an hour since i coded this spineless invertebrate jelly of a code and i already have no idea how it works anymore :,)

ch1ck3n (1268)

@ch1ck3n Now make a one liner using no lambdas

rafrafraf (1369)

@ch1ck3n that seems... impossible depending on what you want me to make in one line

ch1ck3n (1268)

@rafrafraf i challenge you to make a typing speed test thingimajigy (lambdas allowed and more then one line allowed for importing things)

rafrafraf (1369)

@ch1ck3n if you check the code then youll see how to import inline so it should be possible in one line although im not sure how to go about making a console based typing speed test.. not sure if thatd work well

OldWizard209 (985)

Are you trying to be eco-friendly @rafrafraf ???

Pretty kewl

rafrafraf (1369)

@OldWizard209 ahahaha my goal is to make code so disgusting that not even i can understand it

OldWizard209 (985)

XD But good job, I wouldnt even be able to do it in a hundred lines @rafrafraf

LuckyOreos (186)

Dude this rocks I’ve seen a lot of your other work to but this is epic

rafrafraf (1369)

@DarthVader29 thanks man! this is my proudest work ahaha

Silver13Soul (9)

Am I the only one who went into the code to find the answers?

FlaminHotValdez (364)

abuse ze lambda. again.

XanderK20 (7)

This code deeply disturbs me
And I love it, Could you add a couple more words though?

rafrafraf (1369)

@XanderK20 LMAO thanks man and will do!

JBloves27 (1521)

hahahaha, you should maybe add more words! Keep it up! lmao

adl212 (158)

technically you can just use exec

rafrafraf (1369)

@adl212 well yeah but wheres the challenge then? ive restricted myself to make it one expression (so cant start with "while [whatever]:") cant use semi colons, and of course no exec

adl212 (158)

@rafrafraf huh. I never knew you could even use semi colons in python lol. tho i like how you made your "while" function

rafrafraf (1369)

@adl212 lmaoo thanks man! I had to use recursion as theres no way to use while inline.. however someone recently showed me another way to go about it which ill try use for my next inline challenge

adl212 (158)

@rafrafraf don't worry i don't know how to do any of that stuff