Python Quick Reference
Python Quick Reference
>>> import os
>>> os.getcwd()
'C:\\Program Files\\Python33'
Change directory
os.chdir("codechef") #change current working directory
Files:
txt = open(filename)
txt.read()
Print(txt.read()) – Print file contents