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
2 odpowiedzi
+ 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
+ 1
You need to learn Core Python, Object Oriented Concepts. !