Python Programs | IT Developer
IT Developer

Python Programs



Share with a Friend

Print today's date using formatted output - Python Program

Introduces f-strings, a modern way of formatting strings in Python 3.6+.

An f-string, or formatted string literal, is a feature introduced in Python 3.6 that provides a concise and readable way to embed expressions directly within string literals.

It simplifies string formatting by eliminating the need for methods like str.format() or traditional string concatenation.

# Displays the date using f-string formatting day = 3 month = "August" year = 2025 print(f"Today's date: {day} {month}, {year}")

Output

 
OUTPUT :
Today's date: 3 August, 2025