I\'m trying to write a code that lets me find the first few multiples of a number. This is one of my attempts:
def printMultiples(n, m): for m in (n,m): prin
Does this do what you want?
print range(0, (m+1)*n, n)[1:]
For m=5, n=20
[20, 40, 60, 80, 100]
Or better yet,
>>> print range(n, (m+1)*n, n) [20, 40, 60, 80, 100]
For Python3+
>>> print(list(range(n, (m+1)*n, n))) [20, 40, 60, 80, 100]