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 trialChristian Gjerdingen
3,574 PointsI made code that works as requested, but it's not accepted by the code challenge.
I guess the code speaks for itself
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
Henrik Christensen
Python Web Development Techdegree Student 38,322 Pointsremove long and complex and the code should pass
Christian Gjerdingen
3,574 PointsChristian Gjerdingen
3,574 PointsThanks, now it worked ! Thought I tried that already :)