Can I ask what is the concept of the print format specifications used by %0xd in python 3? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can I ask what is the concept of the print format specifications used by %0xd in python 3?

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

27th Jul 2018, 10:15 AM
Yap Jheng Khin
Yap Jheng Khin - avatar
4 Answers
+ 1
printf() is the main way to display text to the console in the C language. It allows string formating using a percent sign, Python took that syntax and implemented it.
27th Jul 2018, 10:21 AM
TurtleShell
TurtleShell - avatar
27th Jul 2018, 10:28 AM
TurtleShell
TurtleShell - avatar
0
🤔🤔🤔I understand how printf() works...but the what does %0xd means anyway? I saw from one book that describes %0xd as an integer padded with x leading zeros.
27th Jul 2018, 10:25 AM
Yap Jheng Khin
Yap Jheng Khin - avatar
0
TurtleShell Tq for your help 🤗🤗🙏🙏
27th Jul 2018, 10:38 AM
Yap Jheng Khin
Yap Jheng Khin - avatar