or use try/except TypeError to handle the exception
and by the way, are you sure you need to convert to int. In the JSON response you show in your other thread the numeric values are converted to int/float. They are not strings. Still
and by the way, are you sure you need to convert to int. In the JSON response you show in your other thread the numeric values are converted to int/float. They are not strings. Still
null
will be converted to None
so you still need to do some checks, but no need to convert
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs