+ 2
Guys I have a question
Are they other data types apart from boolean, int, str, and float??
3 Respuestas
+ 5
Yes,
Data types are of two type:
1)primitive: predefined data types such asint,char,float,bool,etc.
2)Non-primitive: User defined data types such as structure,classes,unions,etc.
+ 1
Yes, besides boolean, int, str, and float, there are several other data types in most programming languages, including:
Character (char): Represents a single character.
Complex (complex): Represents complex numbers with both real and imaginary parts.
Date/Time: Represents dates and times.
List: An ordered collection of data.
Tuple: An immutable ordered collection of data.
Set: An unordered collection of unique data.
Dictionary (map): A collection of key-value pairs.
+ 1
Md Sohaib Alam
There are no primitive or non-primitive data types in Python. Everything is an object that is a subset of a PyObject.
Armand Akhabue
There are many data types -- those are the core ones. Data structures are more (list, sets, etc..). Even None.
You can even create your own type by creating a class.
Yash Shreshtha Raj
Char is not a type in Python. There is no separation from a string to a single character.