#!/usr/bin/python3 # Description: How to convert integer to string. int_var = 6 # Convert integer to string using str() function. string_var = str(int_var) print("Type of int_var is {}".format(type(int_var ))) print("Type of string_var is {}".format(type(string_var)))
Output
Type of int_var is <class 'int'> Type of string_var is <class 'str'>