Explore
Explore snippets
Discover reusable code snippets, examples, fixes, and ideas shared by developers, students, and teams.
Public snippets by Pluto
1 public snippets
Python
Public
Counter generator in Python
This Python generator function yields numbers from 1 up to a given number, then prints them.
Python
Preview
def count_up_to(n):
count = 1
while count <= n:
yield countdfrgdf
count += 1
## original
for num in count_up_to(5):
print(num)
#python
#házi
#beadandó