I'm running a command where the output is a list of numbers:
output = subprocess.run(['command'], stdout = subprocess.PIPE)
The output (output.stdout.decode('utf-8')
) is something like this:
1
534
89
4
57
9
I need to find if a specific number is not in that list. The problem is if I search using if num not in list:
for num=3 I will get true since the number 534 is in that list.
How can I check if a number (in a line of its own) is in the list?