14 lines
386 B
Python
14 lines
386 B
Python
#!/usr/bin/env python3
|
|
|
|
if __name__ == "__main__":
|
|
print(f"Price {1:.2f}")
|
|
print(f"Price {3.1415:.2f}")
|
|
print(f"Price {300000000.1415:,.2f}")
|
|
|
|
print(f"Value hex {1000:x}")
|
|
print(f"Value hex {1000:X}")
|
|
print(f"Value hex {1:.2%}")
|
|
|
|
print("Price {0:,.2f}, count {1}".format(100, 100))
|
|
print("Price {price:,.2f}, count {count}".format(price=100, count=100))
|