Modified some examples with more comments and details,
adding casting example for python