Convert Int to String in Python

In this example , we have get an number from user . And to convert string by using str(num).

Source code :

num = input("enter num : ")
result = str(num) #this will be a string
print(result)

Output :

enter num : 5
5

Algorithm :

  1. Get an input from user.
  2. Convert to string and print.

Output :


                

Comments :