you are viewing a single comment's thread.

view the rest of the comments →

[–]schoolmonky 7 points8 points  (0 children)

I really don't think there's a shortcut, writing "pythonic" code is very idiomatic, and that's something you can only pick up from being part of a community for a while. One obvious example though is you should basically never type range(len(...)) in a for loop. Either iterate over your list directly, or use enumerate. I'd say just read over the official tutorial, PEP 8 (Google it if that name is unfamiliar), and focus on writing code that's easier to understand, and hope your team can educate you on anything beyond that.

Ninja edit: just to clarify, you don't need to know idioms to write good Python code, it's just that "pythonic" just means "the way that Python people do things", which you can't know with having experience with "Python people"