Using Python slice assignments

Interpreter at run the following code: 
List1 = [4,5,6,7,8,9] List1 [2: 5] = [ 'A', 'B', 'C']

Result: [4, 5, 'a', 'b', 'c', 9]

 

Guess you like

Origin www.cnblogs.com/IT-kingman/p/11546466.html