New answers tagged python
1
vote
Tips for golfing in Python
Repr trick
Suppose you are using Python 3.
You can use '%r'%a instead of repr(a):
...
Top 50 recent answers are included
Related Tags
python × 140code-golf × 86
tips × 62
king-of-the-hill × 26
game × 9
string × 6
math × 5
optimization × 5
programming-puzzle × 5
code-challenge × 4
popularity-contest × 4
fastest-code × 4
decision-problem × 3
restricted-source × 3
primes × 3
palindrome × 3
card-games × 3
board-game × 3
array × 3
kolmogorov-complexity × 2
geometry × 2
combinatorics × 2
cops-and-robbers × 2
test-battery × 2
error-message × 2