Full Playlist : • Py-Pie Python Tutorial
Facebook : / py-pie-python-for-beginners-113344127050954
Twitter : / shankar35425457
'''
Arrays in Python
1. Declaration and Initialization
2. Adding elements to array insert() and append()
3. removing elements from array pop() and remove()
4. accessing elements of an array
5. slicing of an array
6. Next video : cool PS using arrays.
'''
import array
x = array.array("i", [1,2,2,3])
y = array.array("d", [1.2,2.2,2.2,3.4])
x.insert(4,2)
y.insert(1,0.3)
x.append(6)
y.append(9.1)
x.pop(2)
y.pop(2)
x.remove(2)
y.remove(2.2)
for i in range(len(x)):
print (x[i])
for i in range(len(y)):
print(y[i])
#
#slicing to slice down the array
array[start:end]
print(x[1:3])
print(x[2:])
print(x[:2])
On this page of the site you can watch the video online Python Tutorial for Beginners | Python Arrays Programming with a duration of hours minute second in good quality, which was uploaded by the user harshal mishra 01 January 1970, share the link with friends and acquaintances, this video has already been watched 18 times on youtube and it was liked by 4 viewers. Enjoy your viewing!