Python lists
Python Lists
sq = [1, 2, 4, 9, 16, 25]

print (sq)

print (sq[0])

print (sq[:])

print (sq[-3:])

print (sq[:3])

print (sq[3:])

print (sq[3:5])

sq1 = sq[:]

print (sq1)

sq.append (36)
print (sq)

sq[:] = []
print (sq)

print (len (sq1))
print (sq1.pop ())
Comments