Slice without using Python, colon (:). a.__getitem__ (slice (3,5)).

Overview

In Python, I arrived at a method of slicing without using a colon (:), so information sharing. There is no deep meaning. I thought that I wouldn't meet each other so much, so just as information.

Slice without using Python, colon (:). manner.

>>>
>>> a = [10,20,30,40,50,60,70]
>>> a.__getitem__(slice(3,5))
[40, 50]
>>>

Slices are also ** \ _ \ _ getitem \ _ \ _ **. You may not come across the writing style of ** slice (3,5) **.

Summary

Nothing in particular. I was thinking about something else and met, so I wrote an article. If you have any comments, please let us know. ** If you really knew the level of this article, In the comment section. .. .. See that (other power) **

Recommended Posts

Slice without using Python, colon (:). a.__getitem__ (slice (3,5)).
[Python3] Google translate google translate without using api
Python slice
python string slice
Start using Python
Python slice basics
Scraping using Python
Modulo without using%
Operate Redmine using Python Redmine
Fibonacci sequence using Python
Data analysis using Python 0
Data cleaning using Python
Using Python #external packages
Write FizzBuzz without using "="
WiringPi-SPI communication using Python
Age calculation using python
Error when executing Python commands without using Anaconda Prompt
Search Twitter using Python
Make Python segfault on one line without using ctypes
How to retrieve multiple arrays using slice in python.
Name identification using python
Notes using Python subprocesses
Quicksort without using sort
Try using Tweepy [Python2.7]
[python] Array slice operation
Control smart light "Yeelight" from Python without using the cloud
Disable SSL validation without using verify = False in Python requests
Try building a neural network in Python without using a library
Python notes using perl-ternary operator
Flatten using Python yield from
Scraping using Python 3.5 async / await
Save images using python3 requests
[S3] CRUD with S3 using Python [Python]
[Python] Try using Tkinter's canvas
Using Quaternion with Python ~ numpy-quaternion ~
Try using Kubernetes Client -Python-
Python notes using perl-special variables
[Python] Using OpenCV with Python (Basic)
Scraping using Python 3.5 Async syntax
Python and ruby slice memo
Website change monitoring using python
Start to Selenium using python
Search algorithm using word2vec [python]
python: Basics of using scikit-learn ①
# 1 [python3] Simple calculation using variables
Create JIRA tickets using Python
Instrument control using Python [pyvisa]
Manipulate spreadsheets locally using Python
Python memo using perl --join
Web scraping using Selenium (Python)
Slice error in python (´ ; ω ; `)
[Python] I tried using OpenPose
[Python] JSON validation using Voluptuous
Gamma correction without using OpenCV
Broadcast on LINE using python
Data analysis using python pandas
Translate using googletrans in Python
Using Python mode in Processing
Using OpenCV with Python @Mac
[Python] Shooting game using pyxel
Send using Python with Gmail