python learning (code example && some comments)