Add Two Digits In Python l Add Two Number in Python

Опубликовано: 14 Февраль 2026
на канале: Python Programming
207
3

Below are the methods to sum of the digits. 
Method-1: Using str() and int() methods.: The str() method is used to convert the number to string. The int() method is used to convert the string digit to an integer. 

Convert the number to string and iterate over each digit in the string and after converting each digit to integer and add to the sum of the digits in each iteration. 

using user input digit

#python #pythonprogramming #pythontutorial