0

What does "%s %s" mean?

I found an exercise online, it's about printing the first color of the list and the last color of the list. code: color_list = ["Red","Green","White" ,"Black"] print(("%s %s"%color_list[0],color_list[-1])) output: Red Black so did "%s %s" remove the quotation mark for some reason? is that all it can do? cus i don't understand how it works, or how i might use it in a future project. The language used is Python.

30th May 2021, 9:32 AM
Husstavo
2 ответов
+ 2
Kindly mention the language in relevant tags section.
30th May 2021, 9:38 AM
Arsenic
Arsenic - avatar
+ 2
%s is a placeholder for the to be printed elements
30th May 2021, 9:47 AM
Lisa
Lisa - avatar