New course! Every coder should learn Generative AI!
Try a free lesson- 1
How to do this in f-strings ?
print("123456789 becomes {:,}".format(123456789)) #output : 123,456,789
1 Answer
0
print(f"{123456789:,}")
print("123456789 becomes {:,}".format(123456789)) #output : 123,456,789