“Impression python f” Réponses codées

Impression python f

From geeksforgeeks:
"PEP 498 introduced a new string formatting mechanism known as Literal 
String Interpolation or more commonly as F-strings (because of the leading f 
character preceding the string literal). The idea behind f-strings is to 
make string interpolation simpler"

Example

name = 'Michael'

print(f"My name is {name}")
MitchAloha

Imprimer (f) Python

my_var = "world"
print(f"hello {my_var}")
# hello world
Plif Plouf

Réponses similaires à “Impression python f”

Questions similaires à “Impression python f”

Plus de réponses similaires à “Impression python f” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code