+ 1

What is an aray

10th Jan 2023, 5:04 PM
Akhil Daram
Akhil Daram - avatar
6 Answers
+ 4
Simply array is a group of variables! In python environment you can add any type of data into your user define array like ints ,strings ,bools and so on! Now you may have a problem "why should i use Arrays???" Main answer is for the iterative solutions! How do you check the values of normal variables with loops! It's quite difficult! But you can do it simply by accessing array item with indexes!
10th Jan 2023, 5:26 PM
Dilip ishara
Dilip ishara - avatar
+ 4
Hi, Akhil Daram ! In some programing languages it’s, just as Lamron mention, a mutable (liable to change) collection of data, but of the same data type. Python don’t use exactly that word (no builtin suport for arrays). Instead in Python lists are similare to arrays, but all elements can be of different data types, if you so wish. You want to work with more classical arrays, you can look at for example the NumPy library, that has arrays. The arrays in NumPy are specially good to use if you want to do operations with them or its elements.
10th Jan 2023, 5:36 PM
Per Bratthammar
Per Bratthammar - avatar
+ 1
Array is just a collection of data(if I'm correct). This can have either similar or different data types. Example: a = ["b", 4, 7, ("d", "j"), "k", 3, 7] That's all it is really... Just a list of different/same data types
10th Jan 2023, 5:06 PM
Lamron
Lamron - avatar
+ 1
Like a balloon that is stretched with elements, and the name of the array differs from one language to another, such as Python, it is called a list, and array can be placed inside the array, and this is what is called the two-dimensional array, and there are triple and quadruple..etc This an example: My_Array = [1,2,3,4] My_text_array = ["I" , "hope", "you" , "understand"]
11th Jan 2023, 8:47 PM
Hazem Emad
Hazem Emad - avatar
0
An array is simply a collection of datatype when stored in a variable name.
12th Jan 2023, 1:58 PM
DN Josh
DN Josh - avatar