If I read my file like this:
f = open('path_to_file').readlines()
...more..code...
What happens to the file object? When will it close and get garbage collected?
Can anyone explain behind the scenes?
If I read my file like this:
f = open('path_to_file').readlines()
...more..code...
What happens to the file object? When will it close and get garbage collected?
Can anyone explain behind the scenes?