にそれを作る文字列からスペースを削除します。Pythonの私が<code><span id="balance">1 268</span></code>にスペースを削除し、それ<code>int</code></p> <p>コードになるだろうどのようにint型
Balance_afterWinORLoseBet.replace(" ", "")
Balance_afterWinORLoseBet = int(balance_new.text) #Makes new var, turns it into int.
if "10.1" in countdown_timer.text: #
Balance_afterPlaceBet.replace(" ", "")
Balance_afterPlaceBet = int(balance_old.text) #Makes new var, turns it into int.
Error
:
Balance_afterWinORLoseBet = int(balance_new.text) #Makes new var, turns it into int. ValueError: invalid literal for int() with base 10: '1 268'
ただ、これは、タブのために動作しないことを指摘したいと思います。 – ssundarraj
コードのみの回答はお勧めしません。コードが何をしているのか、どのように答えているのか、いくつかの説明を追加してください。また、コードをコードとしてフォーマットします。 – JeffC