New Python codes