I have a simple function to do simple math operations. If I call this from another script using import, I get no output. If I remove def function, everything is working fine. What's the problem with defining this function? I'm new to Python.
def calci(a, op, b):
if op == '+':
c = a + b
elif op == '-':
c = a-b
elif op == '*':
c= a*b
elif op =='/':
if(b == 0):
print('can\'t divide')
c = a/b
print('value is',c)
return c
result = calci(12,'+', 12)
print(result)