#51BeginnerVariables & Types· Built-in Types
Data Types Explorer
Input format
`values`: a list of strings.
Output format
A list of type names, one per input string, in the same order.
Examples
Input: values = ["42","3.14","True","None","hello"]
Output: ["int","float","bool","NoneType","str"]
One value of each kind.
Input: values = [" -7 ","+.5","true",""]
Output: ["int","float","str","str"]
Spaces are removed first. Lower-case `true` is not a bool literal, and an empty string stays a string.
Constraints
- 0 <= len(values) <= 100
- Each string has at most 30 characters
Study first
- #python
- #data-types
- #type-conversion
- #strings
