isub() function in python by R4R Team

- isub() is a python function which subtract the given two number.
- it is predefined in operator module.

Syntax-

operator.isub(num1,num2)

Example-
operator.isub(3,4) will give -1
operator.isub(8,1) will give 7


program-

import operator

#take input of two number
print("Enter first number")
a=int(input())
print("Enter second number")
b=int(input())

#find subtraction by isub() function and display
print('Subtraction of first number to second is ',operator.isub(a,b))


output-

Enter first number
-1
Enter second number
-5
Subtraction of first number to second is 4

Enter first number
8
Enter second number
100
Subtraction of first number to second is -92




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!