Clearing all selected items (check box, radio buttons & selectbox)

Hello Team,

I’m trying to reset my selection by deleting each element in streamlit.session.state.
But not able to do so.

Reproducible Code -

import streamlit as st
from streamlit import caching

st.set_page_config(layout="wide")

columns = st.columns(4)

columns[0].header("Session State Start")
columns[0].write(st.session_state)


n_check_box = 3
columns[1].header("Sample CheckBox")
for i in range(n_check_box):
    label = "check_box_" + str(i + 1)
    columns[1].checkbox(label=label, value=False, key=label)


n_radio_button = 2
columns[2].header("Sample Radio Button")
for i in range(n_radio_button):
    key = "radio_button_" + str(i + 1)
    label = "Radio Selection " + str(i + 1)
    values = ["Radio " + str(n) for n in range(n_radio_button)]
    columns[2].radio(label, values, key=key)


columns[3].header("Session State End")
columns[3].write(st.session_state)


if st.button("Clear Selection", key="clear_selection_button"):
    st.subheader("Executing code")
    code_clear_session_state = """
    for key in st.session_state.keys():
        del st.session_state[key]
    caching.clear_cache()"""
    st.code(code_clear_session_state, language="python")

    for key in st.session_state.keys():
        del st.session_state[key]
    caching.clear_cache()

streamlit-sessio-state-issue