+ 2

Guys I have a question

Are they other data types apart from boolean, int, str, and float??

6th Dec 2024, 9:39 AM
Armand Akhabue
Armand Akhabue - avatar
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.
6th Dec 2024, 12:46 PM
Md Sohaib Alam
Md Sohaib Alam - avatar
+ 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.
7th Dec 2024, 7:31 PM
Yash Shreshtha Raj
Yash Shreshtha Raj - avatar
+ 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.
8th Dec 2024, 10:59 PM
Rrestoring faith
Rrestoring faith - avatar