Here’s the code :
arrr=[0,5,12,150,25]
added_value=st.number_input("Enter the value of the last element: ",1)
ladd=st.button('Add to the list ! !')
if ladd:
arrr.append(added_value)
st.write(arrr)
popping=st.button('Pop the last element out !')
if popping:
if arrr!=[]:
arrr.pop()
The problem here is that each time i add a new value , the previous one would be deleted .
Thanks for your attention .