What are the lesser-known but useful features of the Python programming language?
- Try to limit answers to Python core.
- One feature per answer.
- Give an example and short description of the feature, not just a link to documentation.
- Label the feature using a title as the first line.
Quick links to answers:
-
http://stackoverflow.com/questions/101268/hidden-features-of-python#111176
http://stackoverflow.com/questions/101268/hidden-features-of-python#111176
http://stackoverflow.com/questions/101268/hidden-features-of-python#112303
http://stackoverflow.com/questions/101268/hidden-features-of-python#112303
http://stackoverflow.com/questions/101268/hidden-features-of-python#101945
http://stackoverflow.com/questions/101268/hidden-features-of-python#101945
http://stackoverflow.com/questions/101268/hidden-features-of-python#101447
http://stackoverflow.com/questions/101268/hidden-features-of-python#101447
http://stackoverflow.com/questions/101268/hidden-features-of-python#113198
http://stackoverflow.com/questions/101268/hidden-features-of-python#113198
http://stackoverflow.com/questions/101268/hidden-features-of-python#102062
http://stackoverflow.com/questions/101268/hidden-features-of-python#102062
http://stackoverflow.com/questions/101268/hidden-features-of-python#111970
http://stackoverflow.com/questions/101268/hidden-features-of-python#111970
http://stackoverflow.com/questions/101268/hidden-features-of-python#102065
http://stackoverflow.com/questions/101268/hidden-features-of-python#102065
http://stackoverflow.com/questions/101268/hidden-features-of-python/112316#112316
http://stackoverflow.com/questions/101268/hidden-features-of-python/112316#112316
http://stackoverflow.com/questions/101268/hidden-features-of-python#117116
http://stackoverflow.com/questions/101268/hidden-features-of-python#117116
http://stackoverflow.com/questions/101268/hidden-features-of-python#114420
http://stackoverflow.com/questions/101268/hidden-features-of-python#114420
http://stackoverflow.com/questions/101268/hidden-features-of-python#102202
http://stackoverflow.com/questions/101268/hidden-features-of-python#102202
http://stackoverflow.com/questions/101268/hidden-features-of-python#101310
http://stackoverflow.com/questions/101268/hidden-features-of-python#101310
http://stackoverflow.com/questions/101268/hidden-features-of-python#101276
http://stackoverflow.com/questions/101268/hidden-features-of-python#101276
http://stackoverflow.com/questions/101268/hidden-features-of-python#102037
http://stackoverflow.com/questions/101268/hidden-features-of-python#102037
http://stackoverflow.com/questions/101268/hidden-features-of-python#101840
http://stackoverflow.com/questions/101268/hidden-features-of-python#101840
http://stackoverflow.com/questions/101268/hidden-features-of-python#112286
http://stackoverflow.com/questions/101268/hidden-features-of-python#112286
http://stackoverflow.com/questions/101268/hidden-features-of-python#101537
http://stackoverflow.com/questions/101268/hidden-features-of-python#101537
http://stackoverflow.com/questions/101268/hidden-features-of-python#113164
http://stackoverflow.com/questions/101268/hidden-features-of-python#113164
http://stackoverflow.com/questions/101268/hidden-features-of-python#101549
http://stackoverflow.com/questions/101268/hidden-features-of-python#101549
http://stackoverflow.com/questions/101268/hidden-features-of-python#108297
http://stackoverflow.com/questions/101268/hidden-features-of-python#108297
http://stackoverflow.com/questions/101268/hidden-features-of-python#113833
http://stackoverflow.com/questions/101268/hidden-features-of-python#113833
http://stackoverflow.com/questions/101268/hidden-features-of-python#1024693
http://stackoverflow.com/questions/101268/hidden-features-of-python#1024693
http://stackoverflow.com/questions/101268/hidden-features-of-python#143636
http://stackoverflow.com/questions/101268/hidden-features-of-python#143636
http://stackoverflow.com/questions/101268/hidden-features-of-python#101739
http://stackoverflow.com/questions/101268/hidden-features-of-python#101739
http://stackoverflow.com/questions/101268/hidden-features-of-python#168270
http://stackoverflow.com/questions/101268/hidden-features-of-python#168270
http://stackoverflow.com/questions/101268/hidden-features-of-python#116480
http://stackoverflow.com/questions/101268/hidden-features-of-python#116480
http://stackoverflow.com/questions/101268/hidden-features-of-python#114157
http://stackoverflow.com/questions/101268/hidden-features-of-python#114157
http://stackoverflow.com/questions/101268/hidden-features-of-python#3267903
http://stackoverflow.com/questions/101268/hidden-features-of-python#3267903
http://stackoverflow.com/questions/101268/hidden-features-of-python#109182
http://stackoverflow.com/questions/101268/hidden-features-of-python#109182