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 trialPrateek Sharan Lall
1,778 PointsWhat'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!
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
54,971 PointsThe instructions are to return a single string not print
Prateek Sharan Lall
1,778 PointsThank you Kris. How dumb was I to miss such a thing lol... I wouldn't have noticed it for sure!