Getting errors due to older versions of python

Here is my solution,
I’m not sure if my solution is correct.
when will codechef upgrade from python3.6 ?
Sorry if the mistake is from my side

Your solution will run fine in Python 3.8+, but CodeChef uses Python 3.6 do it would give a runtime error.
Hope it helps…