0

I want to add 1 to variable in another function which happens to be within that function. This is my code and I've obviously tried with and without the global:

async def start():
    variable = 0
    async def begin():
        #global variable
        variable += 1
    await begin()

I would need a solution that does not involve function arguments or global variables out of the start() function.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Tacabeu
  • 3
  • 2

0 Answers0