Trying to find row with Device is ready string from response_without_empty_lines that contains multiple lines:
lines = decoded_bytes.split("\n")
non_empty_lines = [line for line in lines if line.strip() != ""]
response_without_empty_lines = ""
for line in non_empty_lines:
response_without_empty_lines += line + "\n"
here i got only lines that contain data, next I want to find a line containing Device is ready:
for i in response_without_empty_lines:
if 'Device is ready' in i:
print(i)
... and get nothing. where am i wrong?