+ 8
When you do something like: str(9), what you're doing is to cast the numeric type to a string. So 9 it's converted to "9". Example: print(str(9)) You can even check the types: num = 9 str = str(num) print(type(num)) print(type(str))
10th Jan 2023, 1:17 PM
Edgar Sabido
Edgar Sabido - avatar
+ 3
It's a function that returns the version of a string of what you pass to it.
10th Jan 2023, 1:00 PM
Edgar Sabido
Edgar Sabido - avatar