TypeError: not supported between instances of str and int【python3】

python3報錯:TypeError: ‘>’ not supported between instances of ‘str’ and ‘int’ **報錯原因:**int類型沒有轉換爲str就比較。 **解決辦法:**將int類型轉換爲str。 運行結果報錯如下: 運行結果正確如下:
相關文章
相關標籤/搜索