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

"Bummer: Try again!" but code works in IDE...

This code works in an ide, why not here?

instances.py
def combiner(arb_list):
    strings = ""
    nums = 0
    for item in arb_list:
        if isinstance(item, str):
            strings += item
        if isinstance(item, (float, int)):
            nums += item

    final = strings + str(nums)
    return final
Dave StSomeWhere
Dave StSomeWhere
19,870 Points

Your code passed for me - I think the challenge bot is goofed up - try closing your browser, open anew and try it again.

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi, Nick Kolarik! I received your request for assistance. Unfortunately, I really don't know what to tell you because for me, it does work here. If I copy/paste your code directly into the challenge it passes with flying colors!

The question then becomes why it doesn't pass for you and my best guess is some caching issue either client-side or server-side. I'd suggest copying what you have here, restarting the challenge completely, and then pasting in this answer. You might even have to shut down the browser and restart it. From what I can tell, your code is spot on!

Hope you get this sorted out! :sparkles: