Python 3 Tutorial: How To Use The Send Method

preview_player
Показать описание
In this Python 3 Tutorial, we take at how to use the send method in Python 3. The send method allows us to send values to the generator.

Be sure to like, share and comment to show your support for our tutorials.

=======================================
======================================
Рекомендации по теме
Комментарии
Автор

your video and this code helped me understand:

def func():
for i in range(20):
print(f'current i is {i}')
x = yield i
print(f'previous i is {i}')
print(f'x is {x}')


gen = func()

next(gen)
gen.send(66)

aminbamavadat
Автор

Why are you so confused yet teaching this?

shivamwadhia
welcome to shbcf.ru