0
a = ("ADD")

s = ("SUBTRACT")

m = ("MULTI")

def function (c1, c2, *c3):
    if a in c3 :
        print(c1 + c2)
    if s in c3:
        print(c1 - c2)
    if m in c3:
        print(c1 * c2)
    else:
        print("wrong value")

I want to make it accept capital and small and mix characters

function(86, 44, "Add")
Barmar
  • 669,327
  • 51
  • 454
  • 560

0 Answers0