Electron microscopy
 
PythonML
slice()
- Python Automation and Machine Learning for ICs -
- An Online Book -
Python Automation and Machine Learning for ICs                                                           http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

In Python, the slice() function creates a slice object that represents a range of indices that can be used to slice sequences such as lists, tuples, and strings. 

Here's the syntax:

slice(start, stop[, step]) 

  • start: The starting index of the slice (inclusive). 

  • stop: The stopping index of the slice (exclusive). 

  • step: The step or stride of the slice (optional). This specifies the interval between each index. 

============================================

Example of slice() application.   Code

   Output:

============================================

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================