title: Is there a better way to create max url page numbers based off known total count of items?
body: <p>I'm trying to see if there's a way to shorten this code. Say this is a job site and it shows that there are a total of 138 jobs available with 20 jobs listed on each page. It takes the known count of total jobs and divides that by 20/page to come up with a total number of pages to iterate through. It works but I feel like there's a better way to do this.</p>
  
  <pre><code>url = "https://fake-job-site.com/search?"
  count = 138
  
  if count % 20 == 0:
      pages = count / 20
  else:
      pages = count / 20 + 1
  
  for page in range(1, pages + 1):
      new_url = url + "&amp;page=" + str(page)
      print(new_url)
  </code></pre>
  
  <p>Result:</p>
  
  <pre class="lang-none prettyprint-override"><code>https://example-url.com/search?&amp;page=1
  https://example-url.com/search?&amp;page=2
  https://example-url.com/search?&amp;page=3
  https://example-url.com/search?&amp;page=4
  https://example-url.com/search?&amp;page=5
  https://example-url.com/search?&amp;page=6
  https://example-url.com/search?&amp;page=7
  </code></pre>