'''
Common format specifiers
-----------------------------------
f"{text:<10}" # Left-align string, width 10
f"{text:>10}" # Right-align string, width 10
f"{number:5d}" # Integer, width 5
f"{number:08d}" # Integer, width 8, padded with zeros
f"{value:12.2f}" # Float, width 12, 2 decimal places
'''
def format_record(name, age, salary):
"""
Format a record using fixed-width fields.
<15 = left-align text in a field 15 characters wide
>10 = right-align integer in a field 10 characters wide
>12.2f = right-align float in a field 12 characters wide
with 2 digits after the decimal point
"""
return f"{name:<15}{age:>10}{salary:>12.2f}"
# Store the formatted string in a variable
result = format_record("Darth ", 53, 89000.0)
print(result)
'''
run:
Darth 53 89000.00
'''