my_file = open("C:UsersPythonfile.txt", "r") #Give the path accurately and use text = my_file.read() print(text) #Output: The text in file.txt will be printed