379. Whoever commits theft shall be punished with imprisonment for a term which may extend to seven years or with fine or with both, and for a second or subsequent offence shall be punished with imprisonment and shall also be liable to fine or to whipping.