Skip to content

Commit 2ba9877

Browse files
committed
len is a function, so don't call it "method"
1 parent a8c4543 commit 2ba9877

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

en/python_introduction/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ Dictionaries, like lists, are *mutable*, meaning that they can be changed after
398398
>>> participant['favorite_language'] = 'Python'
399399
```
400400

401-
Like lists, using the `len()` method on the dictionaries returns the number of key–value pairs in the dictionary. Go ahead and type in this command:
401+
Like lists, using the `len()` function on the dictionaries returns the number of key–value pairs in the dictionary. Go ahead and type in this command:
402402

403403
{% filename %}command-line{% endfilename %}
404404
```python
@@ -464,7 +464,7 @@ True
464464
True
465465
```
466466

467-
We gave Python some numbers to compare. As you can see, not only can Python compare numbers, but it can also compare method results. Nice, huh?
467+
We gave Python some numbers to compare. As you can see, not only can Python compare numbers, but it can also compare function results. Nice, huh?
468468

469469
Do you wonder why we put two equal signs `==` next to each other to compare if numbers are equal? We use a single `=` for assigning values to variables. You always, __always__ need to put two of them – `==` – if you want to check if things are equal to each other. We can also state that things are unequal to each other. For that, we use the symbol `!=`, as shown in the example above.
470470

0 commit comments

Comments
 (0)