a = [ 20 , 40 ]
a = a + [ 50 ]
a. extend( [ 10 , 20 ] )
a. insert( 2 , 100 )
b = a * 3
del a[ 1 ]
a. pop( )
a. remove( 10 )
a[ 2 ]
a. index( 30 , 5 , 7 )
a. count( 20 )
len ( a)
20 in a
100 not in a
[ 10 , 20 , 30 ] [ : ]
[ 10 , 20 , 30 ] [ 1 : ]
[ 10 , 20 , 30 ] [ : 2 ]
[ 10 , 20 , 30 , 40 ] [ 1 : 3 ]
[ 10 , 20 , 30 , 40 , 50 , 60 , 70 ] [ 1 : 6 : 2 ]
[ 10 , 20 , 30 , 40 , 50 , 60 , 70 ] [ - 3 : ]
[ 10 , 20 , 30 , 40 , 50 , 60 , 70 ] [ : : - 1 ]
for i in a: print ( i)
list1 = [ 30 , 40 , 50 ]
list2 = list1
list2 = [ ] + list1
a = [ 20 , 10 , 30 , 40 ]
a. sort( )
a. sort( reverse= True )
import random
random. shuffle( a)
a = [ 20 , 10 , 30 , 40 ]
a = sorted ( a)
a = sorted ( a, reverse= True )
a = [ 20 , 10 , 30 , 40 ]
d = a[ : : - 1 ]
c = reversed ( a)
print ( c)
list ( c)
print ( c)
x = max ( a)
y = min ( a)
print ( x)
print ( y) print ( a)