Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

Which is this data type in Python : a[ [1, 2] , "this text" ] in the given data please tell me which data type [1 , 2] is ?

OpenStudy (anonymous):

am not am expert i think its a list, thats the notation of it if i remember correctly

OpenStudy (anonymous):

I'd say it's a 2D array. e.g. To access that data you'd write somthing like this: a[1][1] = 1 a[1][2] = 2 a[2] = "this text"

OpenStudy (anonymous):

the whole structure its a 2D array, but he asked about [1,2] i think thats a list, in haskell thats the notation, and codes that i have saw in python am almost sure are list too

OpenStudy (anonymous):

I am asking about the data type.

OpenStudy (anonymous):

for eg. string or float or integer

OpenStudy (rsmith6559):

[ 1, 2 ] is a list of integers. It happens to be inside a list of list of integers and string, a[].

OpenStudy (jhonny111s):

The elements of a list don't have to be the same type. The following list contains a string, a float, an integer, and another list: ["hello", 2.0, 5, [10, 20]]

OpenStudy (jhonny111s):

is a list of integers

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: Spooky witch but cute
4 hours ago 3 Replies 0 Medals
Arriyanalol: help
4 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
7 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
6 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!