Write a python program to adding a thousand separator
Program
def myfun():
x = [10989767, 9876780, 9908763, 45687979]
list2=['{:,}'.format(num) for num in x]
print(list2)
if __name__=="__main__":
myfun()
Output:
['10,989,767', '9,876,780', '9,908,763', '45,687,979']
More Questions
38 . Write a python program to adding a thousand separator
39 . Write a python program startswith and Endswith Methods
40 . Write a python program to print Nlargest numbers
41 . Write a python program to print Nsmallest numbers
42 . Write a python program to check two strings are Anagram or not
43 . Write a python program to checking internet speed
44 . Write a python program to print reserved keywords
45 . Write a python program to print properties and methods
46 . Write a python program to open a website using python
47 . Write a python program to print most frequent letter in a string
48 . Write a python program to check memory sizes of list ,set ,tuple
For latest job updates join Telegram Channel: https://t.me/sateeshm