Python Inner Working