Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

data structures in python

1
2
3
4
5
6
7
8
my_list = [1, 2, 3]
print(my_list)
my_list.append([555, 12]) #add as a single element
print(my_list)
my_list.extend([234, 'more_example']) #add as different elements
print(my_list)
my_list.insert(1, 'insert_example') #add element i
print(my_list)
Source by www.edureka.co #
 
PREVIOUS NEXT
Tagged: #data #structures #python
ADD COMMENT
Topic
Name
6+6 =