Python Object-Oriented Python Inheritance Instances

Sudhir Raghur Venkatesalu
Sudhir Raghur Venkatesalu
5,973 Points

Bummer: Didn't get the expected output

Still keep getting error ;-(

instances.py
def combiner(*args):
    a = ""
    b = 0


    for i in args:

        if isinstance(i,str):           
            a += i 
            print(a)
        elif isinstance(i,int) or isinstance(i,float):            
            print('{} in int - '.format(i))
            b += i 
            print(b)



    result = "{}{}".format(a, b)
    return result

1 Answer

Steven Parker
Steven Parker
182,578 Points

It doesn't look like you applied the suggestions I made in your previous question yet. In particular:

  • you don't need the packing operator ("*") in the definition ("def" line)
  • you don't need to "print" anything