I have a log file mylogfile.log and I want to copy all the logs from this file to a variable in python script. I tried to
my_variable = os.system('cat path/to/file/mylogfile.log')
but that won't work because it really output the text to the bash and then the script stuck. How can I do that?