Add two strings as they are numbers

In this program, we will take two numbers as strings and add two strings as they are numbers.

Steps to solve the program
  1. Take two numbers as a string.
  2. Add two strings after converting them into integers using int().
  3. Print the output.
				
					#Printing output
num1 = "3"
num2 = "7"

result = int(num1)+int(num2)

#Printing output
print(result)
				
			

Output :

				
					10
				
			

split a given multiline string into a list of lines

extract name from a given email address

Leave a Comment