There are a few ways you can format a string number to have commas. One way is to use the built-in function called "format". You can use this function like so:
number = 1234567
print(format(number, ","))
This will print out the number with commas like so: 1,234,567.
Another way to format a string number to have commas is to use the "str.format" method. You can use this method like so:
number = 1234567
print("{:,}".format(number))
This will also print out the number with commas like so: 1,234,567.