llosts in data structures and example
Hi,
A list in computer is an ordered data structure with a number of elements that are separated by a comma and are enclosed within square brackets . For example, list1 and list2 below contains a single type of data. Here, list1 has integers while list2 has strings. Lists can also store mixed data types as shown in the list3 here.
List 1- [1,2,3,4,5]
List 2- [ 'Python', 'Java', 'C++']
List 3- [1, 'Python', 2, 'Java', 3]
I hope this helps,
All the best