DATA TYPES vs. DATA STRUCTURES

Sorry this may be the wrong place to ask this question, but in this exercise it was mentioned that float, int, dictionary, list etc are TYPES.
My question is aren’t int, float, bool etc classified under DATA TYPES whereas lists, arrays, dictionaries, etc classified under DATA STRUCTURES ???

I’m pretty sure lists and dictionaries are types and structures for data. We can represent data in lists and dictionaries, and lists and dictionaries are structured to hold data. I don’t know if this helps, but I hope you find it useful

2 Likes

Yeah, it makes sense that lists and dictionaries are STRUCTURES to contain DATA. Thanks for your valuable help !!!

1 Like

int, float, str, list, dict, tuple are built-in data types in python and there are many more too. Data structures are used to store a collection of related data. Therefore python provides four built-in data structures in python like list, tuple, dict, set.

4 Likes

Type returned the namespace and the name of the class