title: How to reference variables in Python case's
body: <p>Python has the ability to <a href="https://docs.python.org/3.10/whatsnew/3.10.html#pep-634-structural-pattern-matching" rel="nofollow noreferrer">match values</a> against sets of literals or placeholders like this:</p>
  <pre class="lang-py prettyprint-override"><code>choice = &quot;apple&quot;
  match choice:
      case &quot;plum&quot;: ...
      case &quot;cherry&quot;: ...
      case another_fruit:
          print(&quot;Your selected fruit is:&quot;, another_fruit)
  </code></pre>
  <p>But what if we have a variable called <code>another_fruit</code> and we want to match <strong>exactly the value of that variable</strong>, instead of assigning a placeholder with the same name? Is there any special syntax for this?</p>