Display variable label instead of value
I created two lists as dropdown menus in streamlit.
list = [2, 3, 5, 7, 11]
list1 = [1, 2, 5, 7, 11]
select_options = [list,list1]

dropdown = st.selectbox('Select Option', options=select_options)

Right now the dropdown menu displays 2,3,5,7,11 &amp; 1,2,5,7,11. Is there a way to display the variable label instead so the dropdown menu would show list &amp; list1?

You can have two select boxes, the first selectbox is to make the choice as to which list you want to use and the second selectbox will let you make the choice of the elements in the selected list.
Note: It's not appropriate to name a variable after list because it is a python built-in function. So I renamed your list variable to list1
import streamlit as st

list1 = [2, 3, 5, 7, 11]
list2 = [1, 2, 5, 7, 11]

get_list = st.selectbox('Select List Option', (&quot;List1&quot;, &quot;List2&quot;))
select_options = []
if get_list == &quot;List1&quot;:
    select_options = list1
elif get_list == &quot;List2&quot;:
    select_options = list2

dropdown = st.selectbox(f'Select Option of {get_list}:', select_options)

Output:

