Make a func: get_tp

Make a func: get_tp
return the value of tp, and a_lst
Revise error message format

Revise error message format