2017-01-02

20 best Python questions at stackoverflow in 2016

These are the 20 most rated questions at 2016 Stack Overflow.
Between brackets: question score & answers count
Built date: 2017/01/02 19:55:22 GMT

  1. Pythonic way to avoid "if x: return x" statements - [203/16]
  2. How can I make sense of the `else` statement in Python loops? - [174/13]
  3. How do I avoid the "self.x = x; self.y = y; self.z = z" pattern in __init__? - [160/9]
  4. Why does the floating-point value of 4*0.1 look nice in Python 3 but 3*0.1 doesn't? - [150/4]
  5. Can a line of Python code know its indentation nesting level? - [139/5]
  6. Why are Python's arrays slow? - [130/2]
  7. Times two faster than bit shift? - [120/1]
  8. Why a comparison with a comma at the end "(1,) == 1," gives a tuple "(False,)" in Python? - [106/3]
  9. When is hash(n) == n in Python? - [94/4]
  10. Why do 3 backslashes equal 4 in a Python string? - [87/5]
  11. Why is max slower than sort in Python? - [89/3]
  12. What does x[x < 2] = 0 mean in Python? - [83/5]
  13. Dictionaries are ordered in Python 3.6 - [86/2]
  14. Difference between a -= b and a = a - b in Python - [87/3]
  15. Is there special significance to 16331239353195370.0? - [82/1]
  16. Most pythonic way to interleave two strings - [98/13]
  17. Counterintuitive behaviour of int() in python - [81/4]
  18. Pairwise circular Python 'for' loop - [75/17]
  19. Why does Python allow function calls with wrong number of arguments? - [75/2]
  20. How do I reliably split a string in Python? - [71/5]