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

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. https://code.sololearn.com/cSQwuDeqeg4t/?ref=app /Edit: There's also %x/%X for hexadecimals with lower/uppercase letters
27th Jan 2019, 3:15 PM
Anna
Anna - avatar
0
From where did you learn this function?
27th Jan 2019, 2:55 PM
Calviղ
Calviղ - avatar