Using f-strings in Python to format output

preview_player
Показать описание
The f-string feature in Python lets you format output in strings by using convenient text templates. This walkthrough shows you the basics of how to use f-string formatting in your code.

Follow TECH(talk) for the latest tech news and discussion!
------------------------------­----



IDG ENTERPRISE WEBSITES





Рекомендации по теме
Комментарии
Автор

I run same code, code run but no results in terminal. Any reasons why? Below is my code:

def basic_formatting():
name = "Bx"
from datetime import date
last_signon = date(2018, 5, 1)
print(f"{name} last signed on at {last_signon}. ")

aprice