I have a string that represents a number which uses commas to separate thousands. How can I convert this to a number in python?
>>> int(\"1,000,000
#python3 tenzin def changenum(data): foo = "" for i in list(data): if i == ",": continue else: foo += i return float(int(foo))