title: Select multiple options in checkboxes in Streamlit
body: <p>I am new to Streamlit. I want to make a multiple-choice user input (checkboxes). But I want to select a maximum of 3 options out of 4 options.</p>
  <p>I have tried with the dropdown feature of <code>multiselect</code>.</p>
  <pre><code>import streamlit as st
  option = st.multiselect('Select three known variables:', ['initial velocity (u)', 'final velocity (v)', 'acceleration (a)', 'time (t)'])  
  </code></pre>
  <p>It works. But I think it won't be user-friendly for my case. Also, here I couldn't limit the selections to 3 out of 4. The user can select all 4 options here. But I want the code such that if the 4th one is selected, the previous selection (3rd option) will be automatically un-selected. I prefer the looks of the checkboxes such as the <code>radio</code> buttons:</p>
  <pre><code>import streamlit as st
  option = st.radio('Select three known variables:', ['initial velocity (u)', 'final velocity (v)', 'acceleration (a)', 'time (t)'])  
  </code></pre>
  <p>But using <code>radio</code>, I can't select multiple options. How can I edit it such that I can display it as checkboxes and only 3 options can be selected?</p>