0

Why we use {o} in python. I'm beginner

23rd Apr 2020, 6:47 AM
Dhamo Tharan
Dhamo Tharan - avatar
4 Respostas
+ 1
Mirielle is right, it's used in string as named placeholder for format function. PRO TIP: don't call your variables 'o', please don't. Names should be self-descriptive full_name = "{first_name} {last_name}".format(first_name="Tom", last_name="Tomasson") print(full_name) #output: Tom Tomasson
23rd Apr 2020, 7:36 AM
Piotr Szajer
Piotr Szajer - avatar
0
Tq
23rd Apr 2020, 7:18 AM
Dhamo Tharan
Dhamo Tharan - avatar