The council or other governing body of any town or city of this state may prohibit houses of prostitution and punish the inmates thereof.