File read in python

Python Program to read the contents of sample.txt file and display it.

Program or Solution

				
			
					
			
				
			

Program Explanation

open the file in read mode read all the contents of file using read() method close() the file.

Tech Events

Hackathon