python patterns learning samples