Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16448

Python string formatting [duplicate]

$
0
0

I'm studying the code of an open source project. The code it's written in python and unfortunately I'm not so experienced with it. I found a lot of statement in the code like this:

print "the string is %s" % (name_of_variable, )

I know that, similarly to c language, this is a way to properly format the output, but I really don't understand what is the meaning of the comma right after the "name_of_variable" within the parenthesis.

I searched through python documentation, but I didn't find nothing about that kind of statement. Does anyone know what is its meaning?


Viewing all articles
Browse latest Browse all 16448

Trending Articles


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>