This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
New Python users are often surprised to learn that you call a global function named len() to get the number of items in a container. For example, if you’re used to a language like Ruby or Java, you might expect a Python list to have a length() method, but no – to get a list’s length, you call len(my_list) . Now, of course, beauty is subjective. But why does Python use this approach instead of…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.