How to return (and print) multiple values in a function?

前端 未结 0 388
旧巷少年郎
旧巷少年郎 2021-01-27 05:43

Here\'s my code:

async def random():
    return 1, 2
idk1, idk2 = random()
print(idk1, idk2)

After running, I received the error: cannot unpack n

相关标签:
回答
  • 消灭零回复
提交回复
热议问题