+ 1
when should I use the str() method?? plz help...
3 Antworten
+ 3
str () is a function which is used for converting any data type like ING, FLOAT etc to string. So whenever you want to change the data type of any to string use str ().
+ 2
If I remember correctly str() changes anything to a string. Same as int(). Now I will leave it up to you to find where it might be useful. You learn more by actually programming. When you do something think of how you will do it. What is the fastest and most readable way to do it. And perhaps you will find ways which you never thought of.
0
you should read about data structures
int. str. float.
#basic structures
int can be converted to str
int can be converted to float #viceversa
but but but
str cannot be converted to int