python_variable_name = open("Location_of_the_file\filename.type",'mode_of_file')
python_variable_name.close()
Explanation: Here python_variable_name can be any user given variable name
type can be file type e.g. Text File = .txt ,Doc File = .doc etc
mode_of_file can be 'w' for writing mode,'r' for reading mode , 'a' for append mode