擅长:python、mysql、java
<p>这里有一个替代@Bryan Deng的答案:</p>
<pre><code>num = '123,456,789'
num = num.replace(',', '') # replaces all commas with a '' empty string
# This way we don't have to convert to list than back to string
print(num)
# 123456789
</code></pre>