Python for beginners file

Is there any difference between these 2 codes?

1.fhand = open(‘mbox-short.txt’)

inp =

2.fhand = open(‘mbox-short.txt’,“r”)

There is no difference between the two lines functionally, they do the same thing. ‘r’ is read only mode and is the default assumed when you run the open function.

Python built in functions

1 Like

Thank you):grinning: