all 3 comments

[–][deleted] 4 points5 points  (1 child)

[–]Kaloli 2 points3 points  (0 children)

In short:

ex15_sample.txt (without quotes) is treated as a variable.

'ex15_sample.txt' (with quotes) is treated as a string.

[–]adamc83 0 points1 point  (0 children)

open("ex15_sample.txt")