Home > Article > Backend Development > How to convert numbers to strings in python
#How to convert numbers into strings in python? Let me introduce you to the basic steps:
Step 1: Enter idle in the search bar of the start menu to open the shell;
Step 2: Create a new script file;
Related recommendations: "Python Video Tutorial"
Step 3: Create a new int_str function , assign any number to a variable, take a=111 as an example:
Step 4: Now we need to convert the value of the numerical type a into a string type , we use the str function, and then assign the value to b
b=str(a);
Step 5: Print the value of b through print;
Step 6: Call this function and run the code.
The above is the detailed content of How to convert numbers to strings in python. For more information, please follow other related articles on the PHP Chinese website!