How To Convert While Loop To For Loop In Python Using Visual Studio