Home
Python
2D
Application
Buildin Function
Class
Data Structure
Data Type
Database
Development
Dictionary
Event
Exception
File
Function
GUI Pmw
GUI Tk
Language Basics
List
Math
Network
String
System
Thread
Tuple
Utility
XML
Assign list to a list item : List Assign « List « Python
Python
List
List Assign
Assign list to a list item
L = [
'Already'
,
'got'
,
'one'
] L[1:] = [] print L L[0] = [] print L
Related examples in the same category
1.
How to Create and Assign Lists
2.
How to Update Lists
3.
List: assign by index
4.
List: assign by slice