Tagged Questions
62
votes
42answers
8k views
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 ...
12
votes
6answers
397 views
Alias Member Functions in Python
In Python, one can save bytes by aliasing functions that are used repeatedly. For example:
r=range
a=r(100)
b=r(200)
c=r(300)
However, when the functions are member functions together, I don't know ...