Outputs: value
```
Update an item in Session State by assigning it a value:
python
st.session_state.key = 'value2'     # Attribute API
st.session_state['key'] = 'value2'  # Dictionary like API
Curious about what is in Session State? Use st.write or magic:
```python
st.write(st.session_state)
With magic:
st.session_state
```
Streamlit throws a handy exception if an uninitialized variable is accessed:
```python
st.write(st.session_state['value'])
Throws an exception!
```
Delete items
Delete items in Session State using the syntax to delete items in any Python dictionary:
```python
Delete a single key-value pair
del st.session_state[key]
Delete all the items in Session state
for key in st.session_state.keys():
    del st.session_state[key]
```
Session State can also be cleared by going to Settings → Clear Cache, followed by Rerunning the app.
