async def power ( source , exponent ) : async with streamcontext ( source ) as streamer : async for item in streamer : yield item ** exponent
python raising to a power using for loop
Raise the elements of an asynchronous sequence to the given power .
async def power(source, exponent):
    """Raise the elements of an asynchronous sequence to the given power."""
    async with streamcontext(source) as streamer:
        async for item in streamer:
            yield item ** exponent