import random
def read_random_line(file_name):
with open(file_name, 'r') as file:
lines = file.readlines()
random_line = random.choice(lines)
return random_line.strip()
# Example usage
file_name = input("Enter the file name: ")
random_line = read_random_line(file_name)
print("Random line from the file:")
print(random_line)