title: If multiple list items together in string
body: <p>I have a dictionary with countries and their alpha2 codes.</p>
  <pre><code>all_countries = {
      ...
      &quot;Cambodia&quot;: &quot;KH&quot;,
      &quot;Saint Kitts and Nevis&quot;: &quot;KN&quot;,
      &quot;Comoros&quot;: &quot;KM&quot;,
      &quot;Sao Tome and Principe&quot;: &quot;ST&quot;,
      &quot;Slovakia&quot;: &quot;SK&quot;,
      &quot;Korea, Republic of&quot;: &quot;KR&quot;,
      &quot;Slovenia&quot;: &quot;SI&quot;,
      &quot;Korea, Democratic People's Republic of&quot;: &quot;KP&quot;,
      &quot;Kuwait&quot;: &quot;KW&quot;,
      &quot;Senegal&quot;: &quot;SN&quot;,
      ....
  }
  </code></pre>
  <p>I need to replace in the following list the name of the country to alpha2 code</p>
  <pre><code>....
  [&quot;Pusan National University Hospital&quot;, &quot;49241 Busan&quot;, &quot;Korea&quot;, &quot;Republic of&quot;]
  [&quot;Severance Hospital&quot;, &quot;03722 Seoul&quot;, &quot;Korea&quot;, &quot;Republic of&quot;]
  [&quot;Ospedale degli Infermi&quot;, &quot;47923 Rimini&quot;, &quot;Italy&quot;]
  ....
  </code></pre>
  <p>Output should be:</p>
  <pre><code>....
  [&quot;Pusan National University Hospital&quot;, &quot;49241 Busan&quot;, &quot;KR&quot;]
  [&quot;Severance Hospital&quot;, &quot;03722 Seoul&quot;, &quot;KR&quot;]
  [&quot;Ospedale degli Infermi&quot;, &quot;47923 Rimini&quot;, &quot;IT&quot;]
  ....
  </code></pre>
  <p>And I have a script to change it</p>
  <pre><code>def get_alpha_code(row):
      for i in row:
          if i in all_countries.keys():
              country_code = all_countries[i]
              row.remove(i)
              return country_code
          elif i in all_countries.values():
              code = i
              row.remove(i)
              return code
      return None
  </code></pre>
  <p>But how I can check, that multiple items together are in the dictionary keys?
  <strong>For Example Korea</strong></p>