What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is ...
Today's Google doodle is about Celebrating 50 years of Kids Coding:
The goal is program the path of a little bunny so that it can eat all the carrots. There are 4 types of blocks (see pictures below):
...
Note to challenge writers as per meta consensus:
This question was well-received when it was posted, but challenges
like this, asking answerers to Do X without using
Y
are likely to be poorly received....
Recently (okay, December 2023, I'm a little late) there's been a meme going around about a program checking if a 32-bit unsigned integer is even or odd using four billion if statements:
...
Polygons are named after the number of sides that they have. A pentagon has 5 sides, an octagon has 8 sides. But how are they named? What's the name for a 248-sided polygon?
All polygons are suffixed ...
Matthias Goergens has a 25,604-character (down from the original 63,993-character) regex to match numbers divisible by 7, but that includes a lot of fluff: redundant parentheses, distribution (...