Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

I made code that works as requested, but it's not accepted by the code challenge.

I guess the code speaks for itself

instances.py
def combiner(strnumlist):
    strsum = ''
    numsum = 0


    for x in range(0, len(strnumlist)):
        if isinstance(strnumlist[x], (int, long, float, complex)):
            numsum += strnumlist[x]
        elif isinstance(strnumlist[x], str):
            strsum += strnumlist[x]

    return strsum + str(numsum)

1 Answer

remove long and complex and the code should pass

Thanks, now it worked ! Thought I tried that already :)