What is %s, %r, %d

it could be a silly questions but I just started with LPTHW.
I would like to know what is so I understand.


Those actually come from C (another older programming language) and they relate to the type of what you want to print. %s means string (s for string). %d for decimal (numbers). %r is a python thing though and it means “repr” but I prefer “raw”.

1 Like