title: Hidden features of Python
body: <p>What are the lesser-known but useful features of the Python programming language?</p>
  <ul>
  <li>Try to limit answers to Python core.</li>
  <li>One feature per answer.</li>
  <li>Give an example and short description of the feature, not just a link to documentation.</li>
  <li>Label the feature using a title as the first line.</li>
  </ul>
  <h2>Quick links to answers:</h2>
  <ul>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#111176">Argument Unpacking</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#112303">Braces</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101945">Chaining Comparison Operators</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101447">Decorators</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#113198">Default Argument Gotchas / Dangers of Mutable Default arguments</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#102062">Descriptors</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#111970">Dictionary default <code>.get</code> value</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#102065">Docstring Tests</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python/112316#112316">Ellipsis Slicing Syntax</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#117116">Enumeration</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#114420">For/else</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#102202">Function as iter() argument</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101310">Generator expressions</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101276"><code>import this</code></a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#102037">In Place Value Swapping</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101840">List stepping</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#112286"><code>__missing__</code> items</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101537">Multi-line Regex</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#113164">Named string formatting</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101549">Nested list/generator comprehensions</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#108297">New types at runtime</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#113833"><code>.pth</code> files</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#1024693">ROT13 Encoding</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#143636">Regex Debugging</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#101739">Sending to Generators</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#168270">Tab Completion in Interactive Interpreter</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#116480">Ternary Expression</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#114157"><code>try/except/else</code></a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#3267903">Unpacking+<code>print()</code> function</a></li>
  <li><a href="https://stackoverflow.com/questions/101268/hidden-features-of-python#109182"><code>with</code> statement</a></li>
  </ul>