The below code lost a mark; check50 gave the explanation just below. A different time-out query (by Abhijit) appears to have had a different cause.
The check50 line used: check50 cs50/problems/2021/x/...
The code runs for all 20 sequences on the terminal but during submit50/check50, it runs into an error with the following log:
the code is attached for reference.
if __name__ ==...