I have this code that contains multiple function. The output is fine except that the result of each function appears on a different line. I actually want the output concatenated as one item. I used +, %, f', almost everything I see on the net. Please help. The code is below.
import string
import asyncio
async def get_random_string(length):
# choose from all lowercase letter
letters = string.ascii_uppercase
result_str = ''.join(random.choice(letters) for i in range(length))
print(str(result_str))
async def my_function1():
print(str(random.randint(0,9)))
async def my_function2():
print(str(random.randint(100,999)))
async def my_function3():
print(str(random.randint(100000,999999)))
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(my_function1(), get_random_string(3),\
my_function2(), get_random_string(4), my_function3()))```