title: Is it possible to sort a list in a "for in"-loop (Python)
body: <p>So I have this:</p>
  
  <pre><code>Channel.groups.sort() # Channel.groups is a list of strings
  
  for country in Channel.groups:
      print(country)
  </code></pre>
  
  <p>But I would like to do something like this:</p>
  
  <pre><code>for country in Channel.groups.sort():
          print(country)
  
  # This results in error: TypeError: 'NoneType' object is not iterable
  </code></pre>
  
  <p>Is it possible to somehow force <code>Channel.groups.sort()</code> to "execute" before it starts to iterate through the list?</p>