slice
-
SliceDynamicPL/Python 2019. 10. 28. 15:54
1. Overview Slicing relies on indexing. It only works with sequence types. 2. Description 2.1 Capability on sequence types 2.2 Sequence type 2.3 Slice start and stop bounds 2.4 Step value 2.5 Range equivalence 2.6 Transformation [i:j] 2.7 Transformations [i:j:k], k > 0 2.8 Transformations [i:j:k], k < 0 2.9 indices method 2.10 Summary 3. Example 3.1 Example 1 3.2 Example 2 4. References https://..
-
Array OperationsDynamicPL/Javascript 2019. 9. 22. 09:05
1. Overview Summarize array operations, such as pop, push, shift, unshift, splice, slice, and split in javascript 2. Description var a = [1, 2, 3]; var b = a.unshift(0); console.log(a); //[0, 1, 2, 3] console.log(b); //4 var a = [1, 2, 3]; var b = a.shift(); console.log(a); //[2, 3] console.log(b); //1 var b = a.shift(2); console.log(a); //[3] console.log(b); //2, only one element is shifted var..