String Formatting | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

String Formatting

What's the result of this code? print("{0}{1}{0}".format("abra", "cad"))

11th Aug 2021, 6:50 PM
ARISTIDE ON-KEBA YAGO DERING
ARISTIDE ON-KEBA YAGO DERING - avatar
3 ответов
+ 5
0 will be replaced by first argument to format method and 1 will be replaced by second argument to format method.
11th Aug 2021, 7:00 PM
Abhay
Abhay - avatar
+ 2
You can copy this code to sololearn playground and check yourself for the result.
11th Aug 2021, 7:08 PM
Lisa
Lisa - avatar
0
Ok merci ! C'est : abracadabra
11th Aug 2021, 8:15 PM
ARISTIDE ON-KEBA YAGO DERING
ARISTIDE ON-KEBA YAGO DERING - avatar