title: Making a random selection from a list of links based on input in a second elif statement in a function?
body: <p>Python newbie here, and I'm having some trouble with a little beginners project I'm trying to make (also, apologies if the title of the question isn't very explanatory, I'm still learning the lingo).</p>
  <p>The gist of the project is that based on the user's input of what &quot;mood&quot; they're feeling, the program will return a YouTube video of music based on that input. For example in the code below, I started with a prompt called &quot;jazzy&quot;, which will return jazz music:</p>
  <pre><code>import random
  import webbrowser
  
  jazzy = [[&quot;https://www.youtube.com/watch?v=fAi7IeJG-6Y&quot;], [&quot;https://www.youtube.com/watch?v=bcp2MFfF_xc&amp;t=1686s&quot;], [&quot;https://www.youtube.com/watch?v=eZAuY5M7J-Y&quot;]]
  funky = [[&quot;https://www.youtube.com/watch?v=ZPHoVmBIqPk&quot;], [&quot;https://www.youtube.com/watch?v=mVphcpIoTpc&amp;t=940s&quot;]]
  
  def user_mood():
      mood = input('What mood are we in today?')
      if mood == &quot;jazzy&quot;:
          jazz_open = webbrowser.open_new(random.choice(jazzy))
          jazz_open()
      elif mood == &quot;funky&quot;:
          funk_open = webbrowser.open_new(random.choice(funky))
          funk_open()
      elif mood != &quot;jazzy&quot; or &quot;funky&quot;:
          print(&quot;Sorry, I don't have an option for &quot;, mood, &quot;in my catalogue.&quot;)
  
  user_mood()
  </code></pre>
  <p>The &quot;jazzy&quot; section; that is, the if statement portion of the code works perfectly. It randomly chooses from the list in jazzy no problem. However, when I try to input &quot;funky&quot;, to get the same process going but for the &quot;funky&quot; list, the program simply closes (using VSCode). Trying it in the windows command prompt returns the last elif statement which says it doesn't have the input option in the catalogue.</p>
  <p>The goal for this little project is to expand the number of genres and the number of options in the lists to a respectable size, but seeing as I'm still very new to Python, I'm not sure if using just the one function for the whole project is a good idea, or if I should split the project into numerous functions for each genre/input.</p>
  <p>Thanks a lot in advance! :)</p>