This repository has been archived on 2024-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
2023-07-16 13:23:25 +00:00

28 lines
483 B
Python

import asyncio
from typing import Never
async def print_nums() -> Never:
num = 1
while True:
num += 1
print(num)
await asyncio.sleep(0.1)
async def print_time() -> Never:
count = 0
while True:
if not count % 3:
print(f"Time {count}")
count += 1
await asyncio.sleep(1)
async def main() -> Never:
await asyncio.gather(print_nums(), print_time())
if __name__ == "__main__":
asyncio.run(main())