Skip to main content
Notice removed Reward existing answer by hyperneutrino
Bounty Ended with pxeger's answer chosen by hyperneutrino
Notice added Reward existing answer by hyperneutrino
Bounty Started worth 500 reputation by hyperneutrino

What general tips do you have for golfing in Python? I'm looking for ideas thatwhich can be applied to code golf-golf problems in general thatand which are also at least somewhat specific to Python (e.g. "remove comments" is not an answer). 

Please post one tip per answer.

What general tips do you have for golfing in Python? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Python (e.g. "remove comments" is not an answer). Please post one tip per answer.

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 not an answer). 

Please post one tip per answer.

Mod Removes Wiki by Doorknob
Tweeted twitter.com/#!/StackCodeGolf/status/40152154844954624
edited body
Source Link
moinudin
  • 12.8k
  • 7
  • 33
  • 40

What general tips do you have for golfing in Python? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Python (e.g. "remove commentscomments" is not an answer"answer). Please post one tip per answer.

What general tips do you have for golfing in Python? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Python (e.g. "remove comments is not an answer"). Please post one tip per answer.

What general tips do you have for golfing in Python? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Python (e.g. "remove comments" is not an answer). Please post one tip per answer.

Source Link
moinudin
  • 12.8k
  • 7
  • 33
  • 40

Tips for golfing in Python

What general tips do you have for golfing in Python? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Python (e.g. "remove comments is not an answer"). Please post one tip per answer.