Assignment to slices: Remove some : List Element Remove « List « Python






Assignment to slices: Remove some

Assignment to slices: Remove some
a = ['spam', 'eggs', 100, 1234]
# Remove some:
a[0:2] = []
print a


           
       

Related examples in the same category