3 ms·
i love python more than anything else in the world (well, almost), but i think that this example is quite superficial ... this line alone gives python its enorm
by pgbovine 16y ago
i love python more than anything else in the world (well, almost), but i think that this example is quite superficial ... this line alone gives python its enormous 'readability edge' over other languages:
if word.endswith('ing')
of course, it's great standard library design to have a string method called endswith() rather than making people use a regexp ending in '$', since finding suffixes is a common operation. but such a simple operation is hardly indicative of hardcore NLP (which would mostly be hidden in special-purpose library code anyways)