Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyList
#python 3.6.9 #PyList #original code credit goes to Geeks For Geeks and Programiz ; modifications and rest of the code created by Rezaul Hoque on March 15,2022. #contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; a=[['Python','list','example'], ['March',15,2022],['Tuesday','Noon']] c=['P','Y','T','H','O','N','E','X','A','M','P','L','E'] print("Multidimensional list:") print(a) print('Normal list:') print(c) print('Accessing element of multidimensional list:\n') print(a[0][1]) print(a[1][2]) print('Accessing 2nd last element of multidimensional list:\n') print(a[1][-2]) c.remove('O') print('List after removing O:\n') print(c) for i in range(0,1): del c[i] print('List after removing a range:\n') print(c) d=['M','A','R','C','H'] c.append(d) print('After appending the new list:\n') print(c) print('After inserting 1 and 5:\n') c.insert(17,1) c.insert(18,5) print(c) a.extend([['Regular', 'Practice'],'Done']) print('After extend operation:\n') print(a) print('Change item:') c[4:6]=['*','*','*'] print(c) print('Slicing example') print('From beginning to end :') print(c[:]) print('Slicing example list in reverse:') print(c[::-1]) print('Slicing example list in a range: ') print(c[3:10]) print('Concatenation and repeat:') print(c+['Thank',' you']) print("Hurray "*3)
run
|
edit
|
history
|
help
0
ct
list of primes
Lesson3
contarsucesoresmayores
Print lists separated by comma
Implement a stack by using an array
Phython
RANDOM NUMBER
Lesson8
Python3