May-25-2022, 02:02 PM
Hi all,
I have a script where I do a loop condition and show ERROR or OK messages depending of each line return. Example:
"OK""
"WRONG"
"OK"
I want to print all WRONG in first lines. How could I do that? add print outputs to a variable and do a kind of sort and at the end print this variable containing all "print" outputs?
I have a script where I do a loop condition and show ERROR or OK messages depending of each line return. Example:
for v_count_gds in cursor_count: v_count_gd=str(v_count_gds[0]) if (v_count_gd != 0): v_cursor_count1 = v_cursor_count1+1 print("WRONG!!") if (v_cursor_count1 < 1) : print("OK ")But as it goes line by line, if first check if fine is print "OK" , if second it not fine it print "WRONG", if third line is ok it print "OK"like below:
"OK""
"WRONG"
"OK"
I want to print all WRONG in first lines. How could I do that? add print outputs to a variable and do a kind of sort and at the end print this variable containing all "print" outputs?