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])
In questa pagina del sito puoi guardare il video online Python Tutorial for Beginners | Python Arrays Programming della durata di ore minuti seconda in buona qualità , che l'utente ha caricato harshal mishra 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 18 volte e gli è piaciuto 4 spettatori. Buona visione!