Welcome to the Treehouse Community
Looking to learn something new?
Enrica Fedeli-Jaques6,773 Points
what do "to be on strings" and "to be on lists" mean
Hi, I don't understand what the two mean. And what it means that we look for the method in a place or the other? thanks a lot!
Steven Parker216,121 Points
I saw the question while browsing the forum, odd that it didn't create a link button to the video since it listed it on the video.
But what he's talking about the objects that certain methods belong to. When he says "to be on strings", he means the method ("join" in this case) is a string method. So when using the "dot" syntax you would apply this method to a string. A method "on lists" would be one that you would apply with dot syntax to a list.
", ".join(names) # the "join" method is used "on strings" names.sort() # and the "sort" method is used "on lists"