TheIn Python3 the subprocess.check_output() is usedreturns bytes which need to check if a system command executed sucessfully or not. To get the exact output ofbe decoded to the command, you shouldstring before string functions could be used. Another option is to use the legacy subprocess.getoutput() methodfunction.
The following code does the job for me:
items = [s.split('\t: ') for s in subprocess.getoutput(["cat /proc/cpuinfo | grep 'model name\|Hardware\|Serial' | uniq "]).splitlines()] Thanks @AlexP.