- while seq[k] == "<input>":
- o = next_marker(seq, ["<output>"], start=k + 1)
- e = next_marker(seq, ["<input>", "<prog>"], start=o)
- if o is None or e is None:
- raise ValueError("Invalid input/output")
+ while seq[k] == "<in>":
+ o = next_marker(seq, ["<out>"], start=k + 1)
+ if o is None:
+ raise ValueError("Missing output markers (should be correct in the prompt)")
+ e = next_marker(seq, ["<in>", "<prg>"], start=o)
+ if e is None:
+ raise ValueError(
+ "Missing input/output markers (should be correct in the prompt)"
+ )