fork download
  1. decoded_bytes = ("This is a test\n\n"
  2. "Where the Device is ready\n"
  3. "test 1\n"
  4. "test 2\n"
  5. "Device is ready")
  6. non_empty_lines = [line for line in decoded_bytes.split("\n") if "Device is ready" in line]
  7. print(non_empty_lines)
Success #stdin #stdout 0.02s 9172KB
stdin
Standard input is empty
stdout
['Where the Device is ready', 'Device is ready']