- 1

Como declaro un array de multiple tipo de dato, es decir que contenga Int y String?

tipo de dato combinado en array

26th Mar 2018, 4:55 AM
Luis Arcia
Luis Arcia - avatar
1 Réponse
0
To declare an array with elements of multiple data types (Int and String) in Python is by defining a custom class to represent a combined data type and then store instances of this class in the array. In this example, the MixedDataType class is used to hold a data type and its value. We then create an array mixed_array and populate it with instances of MixedDataType containing both integer and string values. Finally, we iterate through the array to print out the values based on their data type. Take a look⤵️ https://sololearn.com/compiler-playground/cpq2P5Rrle00/?ref=app
16th Apr 2024, 4:33 AM
`ᴴᵗᵗየ
`ᴴᵗᵗየ - avatar