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

explain the len(good_guesses)!= len(list(secret_words))

need some help

1 Answer

It would be nice if you added what assignment your doing. However the len function allows you to list how many charachters a string or list is. Say you have:

test = "something"
# Then:
len(test) = 9
# If you do it for list, you get how many string or numbers are in the list so:
list = ["something", "test", "whatever"]
len(list) = 3

The != in you code is saying that something is not equale. So what youre saying is that the length of good guesses, is not equal to the len of the list, secret words. Id dont know what your doing right now, but im assuming your going to want af if infront of that statement, else it dosent really have much meaning. Hope this helps