title: Is it possible to use Python 3.10 in Google Colab?
body: <p>I would like to use the Structural Pattern Matching feature from Python 3.10 in Google Colab so using the commands</p>
  <pre><code>!sudo apt-get install python3.10
  !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
  !sudo update-alternatives --set python3 /usr/bin/python3.10
  </code></pre>
  <p>I was able to make <code>!python --version</code> output 3.10.0, but the <code>print(sys.version)</code> still outputs 3.7.12 in code cells and so the match cases statement raises <strong>SyntaxError</strong></p>
  <pre><code>number = 1
  
  match number:
      case 0:
          print(&quot;Error&quot;)
      case _:
          print(number)
  </code></pre>
  <p>Is there any way to make this work?</p>