Some python programming