Strings and Files Related Tips
Learn how string and file tips improve our code.
Pick to str()
or to repr()
Let’s review some Python programmer preliminaries:
- All of them know about the built-in
str()
function (converts any object to a string). - Not all of them know about the built-in
repr()
function (converts any object to a string). - Even fewer of them know about the difference, which seems nonexistent, at least for numbers:
Get hands-on with 1400+ tech skills courses.