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])
En esta página del sitio puede ver el video en línea Python Tutorial for Beginners | Python Arrays Programming de Duración hora minuto segunda en buena calidad , que subió el usuario harshal mishra 01 enero 1970, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 18 veces y le gustó 4 a los espectadores. Disfruta viendo!