0

Can anyone explain i m little confused

https://code.sololearn.com/cFVW27tSt1LP/?ref=app

20th Apr 2021, 3:09 PM
Akash Prasad
Akash Prasad - avatar
14 Respostas
+ 9
https://www.sololearn.com/Discuss/2760507/?ref=app Akash Prasad , Please, avoid asking duplicate questions again & again. You already got explanation from Jan Markus very well.
20th Apr 2021, 3:11 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 8
Rohit well done 👏 😁😄👍
20th Apr 2021, 4:43 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 8
Rohit There was nothing about IQ here. Well, whatever 🙄 thanks for clarification. I am not in favor of spammers or spamming 😒 so, just politely asked you to give credits. That was rude!
20th Apr 2021, 4:55 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 7
Well, if I don't understand then.. explain in the same thread/question what are you expecting. So, in that context anyone can help you. But, avoid asking same questions again.
20th Apr 2021, 3:35 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 7
Rohit , Please give credits to Jan Markus , as he is the one who helped in previous thread
20th Apr 2021, 3:37 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 5
Rohit No problem :)
20th Apr 2021, 7:00 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 3
lis=["jai","maa","bharati"] name="slog:{2},{1},{1}".format(lis[0],lis[0],lis[2]) print(name) Explanation: Akash Prasad lis[0] = "jai" lis[1] = "maa" lis[2] = "bharati" So this thing: name="slog:{2},{1},{1}".format(lis[0],lis[0],lis[2]) BECOMES name="slog:{2},{1},{1}".format("jai", "jai", "bharati") Here: format("jai", "jai", "bharati") {0} = "jai" {1} = "jai" {2} = "bharati" Therefore, after plugging the strings in its correct index position, we have our final output as: slog:bharati, jai, jai
20th Apr 2021, 6:24 PM
minirkk
minirkk - avatar
+ 2
PLEASE DON'T SPAM BY ASKING THE SAME QUESTION MANY TIMES. your version was: list=["jai","maa","bharati"] name="slog:"{0},{1},{2}.formate(list[0],list[1],list[2]) print(name) 1.) The closing quotation mark what you have after slog: has to be positioned after {2} 2.) the "format" keyword has to be written without the "e" at the end 3.) you should not name a list "list", because "list" is a reaerved keyword in Python. it is used to create a list from an iterable
20th Apr 2021, 3:34 PM
minirkk
minirkk - avatar
+ 2
Shivani 📚✍ All credits goes to Jan Markus ALL CREDITS GOES TO JAN MARKUS AlL cReDiTs GoEs To Jan Markus Are those enough?!! all credits goes to Jan Markus
20th Apr 2021, 4:42 PM
minirkk
minirkk - avatar
+ 1
Shivani 📚✍ sorry!! edited my answer! (I was mad because the same question was being asked many times)
20th Apr 2021, 4:58 PM
minirkk
minirkk - avatar
0
You are not understanding what I am saying after changing indexing
20th Apr 2021, 3:13 PM
Akash Prasad
Akash Prasad - avatar
0
#corrected list=["jai","maa","bharati"] name="slog: {0},{1},{2}".format(list[0],list[1],list[2]) print(name)
20th Apr 2021, 3:35 PM
minirkk
minirkk - avatar
0
Shivani 📚✍ I never mentioned/said that those answers were mine, anyone with an IQ of 150(edited) or above would easily know my intention here, that I was just spamming the already spammed question with the answers I got from the post that you linked here as your answer. And I didn't even check whose answers it were. And thank you for letting me know, thanks Jan Markus! Anyway, I'm sorry for not giving proper credits. Now that Im done crediting, I'm unfollowing this thread. Happy learning and thanks!
20th Apr 2021, 4:49 PM
minirkk
minirkk - avatar
0
L
22nd Apr 2021, 2:15 PM
Aminu Ibrahim
Aminu Ibrahim - avatar