Convert Python strings into other basic data types basing on contents of the string