After you create the file object, you then need to open the file before you can do anything else with it.
open the file, you use the open method, as follows:
result=fileObjectName.open (“mode”)
The result is true if the file was opened successfully; otherwise it is false.
