-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
There are some slices examples, some not working:
print("Must display : [1, 'a', 'b', 'c', 5]")
a = [1, 2, 3, 4, 5]
a[1:4] = ['a', 'b', 'c']
print(a) # Works
a = [1, 2, 3, 4, 5]
a[1:3+1] = ['a', 'b', 'c']
print(a) # Works
a = [1, 2, 3, 4, 5]
a[0+1:4] = ['a', 'b', 'c']
print(a) # Doesn't works
a = [1, 2, 3, 4, 5]
a[1:-1] = ['a', 'b', 'c']
print(a) # Doesn't works
a = [1, 2, 3, 4, 5]
a[0+1:-1] = ['a', 'b', 'c']
print(a) # Doesn't worksMetadata
Metadata
Assignees
Labels
No labels