ใช้ f-string หรือ format() จัดรูปแบบตัวเลขให้มีคอมม่าคั่นพัน จำนวนเต็ม (Integer) print(f{1445:,d}) # 1,445 print(f{140045:,d}) # 140,045 ทศนิยม (Float) print({:,.2f}.format(3435.242563)) # 3,435.24 print(f{1234567.89:,.2f}) # 1,234,567.89 รูปแบบอื่นๆ Format Specตัวอย่างผลลัพธ์