0

Hey it may be a bit silly , but what's the difference between lists and arrays !!

Like even arrays have index and even lists too !! But what's the major difference !?!

24th Jul 2020, 4:26 AM
Ankith M Kashyap
Ankith M Kashyap - avatar
3 Answers
+ 4
I got my answer while an array can contain only one type of item / data Type , whereas a list can contain several different types of item / dataType !!
24th Jul 2020, 4:28 AM
Ankith M Kashyap
Ankith M Kashyap - avatar
+ 2
The major difference between Array and list is you can apply vector operations to arrays that means operations on each element of array using a single line of code but list does not facilitate this. For example array+1 add 1 to each element of array but list+1 just append 1 to the list. You have to use loop to operate each element in list
24th Jul 2020, 7:27 AM
Rajneesh Singh
Rajneesh Singh - avatar
0
Sorry sorry
24th Jul 2020, 4:28 AM
Ankith M Kashyap
Ankith M Kashyap - avatar