Python Object-Oriented Python Inheritance Instances

Prateek Sharan Lall
Prateek Sharan Lall
1,773 Points

What's lacking in my code, any help?

I run my code in the workspace and get the exact result. Please help me to know what did I miss. Thanks a lot!

instances.py
def combiner(my_list):

    result_a = ""
    result_n = 0

    for item in my_list:
        if isinstance(item,str):
            result_a = result_a + item
        if isinstance(item,float):
            result_n = result_n + item
        if isinstance(item,int):
            result_n = result_n + item

    result_n = str(result_n)
    print(result_a + result_n)

2 Answers

KRIS NIKOLAISEN
KRIS NIKOLAISEN
53,322 Points

The instructions are to return a single string not print

Prateek Sharan Lall
Prateek Sharan Lall
1,773 Points

Thank you Kris. How dumb was I to miss such a thing lol... I wouldn't have noticed it for sure!