Hi,
Here one list is loaded with cubes. One element is edited intentionally.
a=[]
for i in range(10):
a.append(i**3)
a[4]=10
print(a)
a.sort(reverse=True)
print(a)
Hi,
Here one list is loaded with cubes. One element is edited intentionally.
a=[]
for i in range(10):
a.append(i**3)
a[4]=10
print(a)
a.sort(reverse=True)
print(a)
Hi all
Array can be implemented in Python using two methods
####Numpy
import numpy as np
hup=np.arange(10)
hup=np.zeros(10)
for i in range(10):
hup[i]=i**2
print(hup)
############
#Using List
a=[]
for i in range(10):
a.append(i**3)
print(a)