Going through the serpentine.py code it seems like modifying the print_flag() function can give the flag.The modified code is in modified_serpentine.py. Just calling the print_flag() function in modified_serpentine.py gives the flag.
picoCTF{7h3_r04d_l355_7r4v3l3d_8e47d128}