0

Is to possible to build/create our own data structures like list, dictionary,... in python ?

What should I need learn in python in order to create a user-defined datastructure? Also answer this question too. https://www.sololearn.com/Discuss/2803359/?ref=app

4th Jun 2021, 12:44 PM
lisa
2 Respuestas
+ 2
yes: in python all data structures are objects... so "to build/ your own data structure" all you need is to define a class for it, and then use it to instantiate data structure of this class/type ;) anyway, built-in data structures as some third party data structure (such as numpy arrays) are implemented in part with c/c++ under the hood to improve efficiency ^^ that's also possible "to build/create" this kind of custom object in python, but that's far beyond the limit of a short answer here ;P
4th Jun 2021, 3:07 PM
visph
visph - avatar
+ 1
You need to learn Core Python, Object Oriented Concepts. !
4th Jun 2021, 2:14 PM
Ratnapal Shende
Ratnapal Shende - avatar