I am trying to read file without modifying the text format and then store it in variable so that I can perform Regex on it. I tried the following code
with open('file.txt', 'r') as file:
data = file.read()
And it stores text like this: first_output
But I want to store text in a variable data like this: required_output
How can I achieve this, I search for many tutorials, blogs but couldn't find the exact solution.