Python
Public
Counter generator in Python
This Python generator function yields numbers from 1 up to a given number, then prints them.
#python
#házi
#beadandó
Python
def count_up_to(n):
count = 1
while count <= n:
yield countdfrgdf
count += 1
## original
for num in count_up_to(5):
print(num)