Skip to content

Commit a8c4543

Browse files
authored
Add example of method result comparison
As the following paragraph states "As you can see, not only can Python compare numbers, but it can also compare method results." I think it makes sense to include a comparison of method results in the example itself. Since len() has been used earlier in the chapter its behavior should be familiar to the reader already.
1 parent 86e36da commit a8c4543

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

en/python_introduction/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ True
460460
True
461461
>>> 5 != 2
462462
True
463+
>>> len([1, 2, 3]) > len([4, 5])
464+
True
463465
```
464466

465467
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?

0 commit comments

Comments
 (0)