28
loading...
This website collects cookies to deliver better user experience
a=array(data type,value list)`
a=array(books, [Harry Potter, Game of Thrones, Narnia, The Hobbit, The Little Prince])
Array_name[index value]
a=array(books, [Harry Potter, Game of Thrones, Narnia, The Hobbit, The Little Prince])
a[1]=Game of Thrones
len()
function to figure out the Python array length:a=array(books, [Harry Potter, Game of Thrones, Narnia, The Hobbit, The Little Prince])
len(a)=5
del
statement:a=array(books, [harry potter, game of thrones, narnia, the hobbit, the little prince])
del books[2]
remove()
method:a=array(books, [harry potter, game of thrones, narnia, the hobbit, the little prince])
del books[harry potter]
remove()
method, you’ll be able to locate and remove a specific element without needing to know its index number.