+ 1
What will happened if we write 2 times file.close() statement?
5 Answers
+ 3
Just try it and you will know what will happen!
+ 3
There whould be an error, because when you close file the object associated with this file will be deleted from memory. The second call of file.close will result in error: object file does not exist.
+ 2
I do not think that anything wrong would happen. As the file is already closed, the close() statement will not do anything.
0
i think its better you try ut yourself when statement is work in a single pharntases why u close it twise
0
Either nothing or it'll return an error, try it yourself to know for sure or check documentation