4 ms·
Hidden Features of Python
- googletron 15y agoI like the dictionaries have get() method tip; So you dont have to worry about unwanted exceptions in code. Then just check for the None case.
- deleted 15y ago[deleted]
- mikedougherty 15y agoI'm only done with the first page so far, but I wouldn't call most of these "hidden". Many of them are oft-touted selling points of the language or appear in basic tutorials. That being said, today I learned about the two-argument form of iter, `iter(f, until)`. So I guess I can't complain too much :D