Pythonic

Written in the natural style of Python, using its built-in features and conventions rather than patterns carried over from other languages.

In more detail

Looping directly over items instead of over indices, using with for files and giving classes a repr are Pythonic. For your own classes it means supporting len, ==, in and printing as users of built-in types expect.

Related terms

Taught in

References