Assignment to slices : List Element Insert : List PYTHON examples


PYTHON examples » List » List Element Insert »

 

Assignment to slices


Assignment to slices: Insert some


a = ['spam', 'eggs', 1001234]
# Insert some:
a[1:1['bletch', 'xyzzy']
print a

a[:0= a     # Insert (a copy ofitself at the beginning
print a

           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo List
» List Element Insert