Sorry if seems basic, but I really don't understand why this returns None:
import asyncio
def syncFunc():
async def testAsync():
return 'hello'
asyncio.run(testAsync())
# in a different file:
x = syncFunc()
print(x)
# want to return 'hello'
how to return 'hello' from asyncio.run?
this works but not what I want:
def syncFunc():
async def testAsync():
print('hello')
asyncio.run(testAsync())
syncFunc()