How can i use '%dsomething' %(var) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

How can i use '%dsomething' %(var)

27th Jan 2019, 2:43 PM
Raveen De Silva
Raveen De Silva - avatar
2 Answers
+ 3
I guess this is python? Those are format specifiers. Use %d for integers, %f for floats and %s for anything else. /Edit: There's also %x/%X for hexadecimals with lower/uppercase letters
27th Jan 2019, 3:15 PM
Anna - avatar
From where did you learn this function?
27th Jan 2019, 2:55 PM
Calviղ - avatar