Python 2
Python 3
Reindent based on first line's indent
Auto convert on paste
# 'Reindent based on first line's indent' will reindent -8 spaces in this case # comments are still kept at this moment from datetime import datetime def foo(): """triple double quotes are escaped""" return '"Hey kid what time is it?"' print foo() + '''\n\t''' \ + str(datetime.now()) try: raise RuntimeError() except: pass # ending \ will be removed, but this happens very rare \
Convert