Python Script Begineer_Component Creation

I just started to use VC and python script behavior. I am not able to understad the syntax till now or how it works.
I am trying to python script a product feeder that only creates a product when an external signal from a boolean button is pressed.
That is i want the product feeder to create a “Box” when i press TRUE and a “Cylinder” when i press “FALSE”
How to start coding it?