title: Django: for loop and if condition in one line
body: <p>I want to bring <code>if dynamic_tickets:</code> and <code>for ticket in dynamic_tickets:</code> in one line. I always receive a syntax error. Do you have an idea, how to achieve that?</p>
  
  <pre><code>def adjust_prices():
      events = Event.objects.filter(status=EventStatus.LIVE)
      active_events = [event for event in events if not event.is_over]
  
      for active_event in active_events:
          dynamic_tickets = [
              ticket for ticket in active_event.tickets.all() if ticket.dynamic_pricing_activated()
          ]
          if dynamic_tickets:
              for ticket in dynamic_tickets:
                  print(ticket)
                  print("DO OTHER STUFF")
  </code></pre>