Minor edit/typo on an article:

Hi FCC!

I am currently part of the Korean translation team. I was working on translating the “Python List Length” and noticed there was a slight error on the content of the article under the length_hint() function:

I believe the revision should be:

The syntax for using the length_hint() method is length_hint(listName).

The example below shows you how to use the length_hint() method to get the length of a list:

from operator import length_hint

demoList = ["Python", 1, "JavaScript", True, "HTML", "CSS", 22]

sizeOfDemoList = length_hint(demoList)
print("The length of the list using the length_hint() method is: " + str(sizeOfDemoList))
# The length of the list using the length_hint() method is: 7

Thank you!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.