Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Cyborg-Model-Z/285f3cae932eafdcc7b9f7b64df34b86 to your computer and use it in GitHub Desktop.

Select an option

Save Cyborg-Model-Z/285f3cae932eafdcc7b9f7b64df34b86 to your computer and use it in GitHub Desktop.
count by x
@camsbury
I'm having trouble figuring out how to count by a certain number- the formula is (x,y) where for y numbers you count by x, aka (2,5) would return [2,4,6,8,10]
```
def count_by(x, n):
while n>0:
lst=[]
lst.append(x+x)
n=n-1
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment