Notes of a Java Geek Learning Python – Language Reference Review

This post consists of quick notes taken while going through “Python 3 – Language Reference”. Please note that this is not the final form of this post and there will be bunch of updates happening on this post in future, detailing each point with a code examples.

Fundamental Lexical Differences


Data model differences


Execution model


The import system



  • List [a, b, c]
  • Set {a, b, c}
  • Dictionary {a:a, b:b, c:c}
  • Generator (x*y for x in range(10) for y in bar(x))
  • Slicing a[start:end:step]
  • Membership check (in / not in)
  • Identity comparisons (is / is not)
  • Lambda – “lambda” [parameter_list]: expression
  • pass statement – pass is a null operation — when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed
  • Deletion of object – del x

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">