How to use a regexp here

Cecil Westerhof Cecil at decebal.nl
Mon Dec 4 04:36:36 EST 2017


I have a script that was running perfectly for some time. It uses:
    array = [elem for elem in output if 'CPU_TEMP' in elem]

But because output has changed, I have to check for CPU_TEMP at the
beginning of the line. What would be the best way to implement this?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list