Answers for "comma separator python"

1

thousands separator python

>>> num = 10000000
>>> print(f"{num:,}")
10,000,000
Posted by: Guest on November-16-2020
0

how to split string with comma in python

# We can use the split() function and put a "," in the parameter 
# It'll return a list with the string split up by commas.
txt = "hello, my name is Peter, I am 26 years old"

x = txt.split(",")
print(x)
Posted by: Guest on June-15-2021

Code answers related to "comma separator python"

Python Answers by Framework

Browse Popular Code Answers by Language