python echo code example
Example 1: print in python 2
# Print is a keyword in python2, so it works more like this
print ""
# Also like this
print 1+1
Example 2: with open as file python
>>> with open('workfile') as f:
... read_data = f.read()
>>> # We can check that the file has been automatically closed.
>>> f.closed
True
Example 3: python print format
'{:10.5}'.format('xylophone')