Answer the question
In order to leave comments, you need to log in
How to create custom data types?
Suppose I want to construct some type of data. Is it possible in Python to do something like:
my_datatype = [int, list, list]
and then:
my_datatype[0] = 123
my_datatype[1] = 'Mike'
my_datatype[2] = 'USA'
Or something similar.
Answer the question
In order to leave comments, you need to log in
It is possible, there are classes for this in Python-e (class instruction).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question