0

What will be the output of this code Print ("{0}{1}{0}".format("abra"."cad"))

29th Jan 2021, 10:39 AM
Bassman
Bassman - avatar
2 Answers
+ 5
>> abracadabra (next time try to run it yourself) ______________________ But here is an explanation: # I will place a dash (-) to separate them (for readability). ("abra", "cad") <--- this is the tuple to access from "{0}-{1}-{0}" <--- string, the numbers inside curly braces { } are the indexes to access the element of the tuple. >> abra-cad-abra
29th Jan 2021, 10:46 AM
noteve
noteve - avatar
+ 1
Thank you 👏
29th Jan 2021, 11:22 AM
Bassman
Bassman - avatar