Check if string is numeric Python makes it easy with isnumeric(). str = "this2009"; print str.isnumeric() str = "23443434"; print str.isnumeric()