how to iterate a certain number of times

I'm going to be receiving a number from an api and I need to run a function (calling an external api) that many times.

How do I loop a certain number of times, when there's no list to start with?

3 replies