Python program to print the int and string in single program

A Python program to print the int and string in single program. In this program we can print the integer and string in a single program in python. In Python, the int() function is used to convert a string to an integer value. The string to convert into an integer and the base in which you want your data to be represented are both passed to int().

The second argument can be left blank if you don’t want to use it. The method returns an integer representation of the value you passed through int(). In Python, a string is a collection of characters. It’s a type of derived data. Strings are unchangeable. This means they can’t be changed after they’ve been defined. Many Python methods, such as replace, are available.

x = 10
y = "inlarn"
print(x)
print(y)

 

Output:

10 

inlarn