Function Visual Studio Code Python Getting Index