Here's my code:
async def random():
return 1, 2
idk1, idk2 = random()
print(idk1, idk2)
After running, I received the error: cannot unpack non-iterable coroutine object. How can I fix this? Thank you!
Here's my code:
async def random():
return 1, 2
idk1, idk2 = random()
print(idk1, idk2)
After running, I received the error: cannot unpack non-iterable coroutine object. How can I fix this? Thank you!
i used asyncio.run
import asyncio
async def random():
return 1, 2
idk1, idk2 = asyncio.run(random())
print(idk1, idk2)