79570865

Date: 2025-04-12 19:45:58
Score: 1
Natty:
Report link

That's correct! I just simply added an extra "false element". Once the city variable reaches it, the program shuts down. Here's the code I came up with which is super simple, and it works:


        city_array = ['1', '2', '3', '4']
        city = get_next_element(city_array)
        print(f"Assigned value: {city}")

        if city == '4':
            break
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: jedihomeslice