Refactored scope

Skip to content
  • Home
  • About

Stackoverflow: Hidden features of Python

WOW, the top answers to this question are amazingly useful

One quick example
Instead of

  if x > 10 and x < 100:
       print "Match"

You can do.....

   if 10 < x < 100:
       print "Match!"

In my opinion, that's very snazzy.

http://stackoverflow.com/questions/101268/hidden-features-of-python

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

This entry was posted in Uncategorized on June 3, 2011 by David.

Post navigation

← No more luck Escape from PHP →

Stack Exchange

profile for David on Stack Exchange, a network of free, community-driven Q&A sites

Recent Posts

  • Filtering and ordering by date with SQLAlchemy
  • Process finished with exit code -1073740791 (0xC0000409) – PySide2 & PyQT5
  • Flask class routing example
  • Portable/reusable flask app skeleton
  • Data migration with SQLAlchemy and Alembic
Proudly powered by WordPress