- #!/usr/bin/evn python
- list1 = ['physics', 'chemistry', 1997, 2000];
- list2 = [1, 2, 3, 4, 5, 6, 7 ];
- print(list1[2]) -1997
- print(list1[-2]) -1997
- print(list1[1:5]) -['chemistry', 1997, 2000]
- print(list1[2:]) -[1997, 2000]
- del list2[2:4]
- print(list2) -[1, 2, 5, 6, 7]
Python - Lists/IN FULL DETAILS
- Features
- _Learn Python
- _Python IDE
- _Ethical Hacking
- Exp_Pages
- _Markdown Editor
- _Komi-san
- _Codesempai
- _About
- _Test_Terminal
- _Tool
- __Progress
- __Pixelizer_Tool
- _Game
- __Killja
- __Hack
- __Find!
- _Cursor
- __Venom
- __Monster
- __Neon
- __Space
- Posts
- Projects
- IDE
- Youtube
- Free Sources
- _All Road Maps
- _Programming Books
- _50 Projects 50 Days
- _Interview Handbook