title: Print "for loop" data after ending loop
body: <p>After ending the for loop , how do i use the output from that loop? 
  Essentially , i would like the last <strong>print(url)</strong> command to give the same output as the <strong>print(url)</strong> command in the <strong>for loop</strong>.</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import requests
  
  source = requests.get('https://dota2.gamepedia.com/Category:Counters').text
  
  soup = BeautifulSoup(source, 'lxml')
  links = soup.find_all('div', class_="mw-category-group")
  
  url = []
  for c in links:
      b = c.find_all('a')
      for a in b:
          u = a.get('href')
          url = "https://dota2.gamepedia.com" + u
          # print("https://dota2.gamepedia.com" + u)
          # print(url)
  
  print(url)
  </code></pre>