title: I scrape data with bs4 I want to end the loop after last value found
body: <p>I don't know how much usernames have because in each iteration data change old users are replaced with new ones so I don`t know who will be the last.How can I break the loop after no more new users are found.</p>
  <pre><code>n = 0
  
  usernames = soup.find_all('div', class_='KV-D4')
  while n &lt; 10000:
      for each in usernames:
          each.get_text()
          n+=1
          if(usernames[last]):
              break
  </code></pre>