xxxxxxxxxx
# Open and read the file
with open('file.txt', 'r') as file:
# Iterate through each line in the file
for line in file:
# Check if the line contains the pattern "root"
if 'root' in line:
# Display the line
print(line)