Notation I encountered while learning Python

Strange notations I met while learning Python

Colon in the array [slice]

hairetu = ["a","b","c","d","e"]

With the array

hairetu[1:3]

If you specify

It comes back with "b", "c", "d".

Also

With the array [: 2] It comes back with "a", "b", "c".

The colon can cut out an array from the index before the colon to the index after the colon.

It seems to be called a slice in Python.

Recommended Posts

Notation I encountered while learning Python
python learning
I took Progete's Python Learning Course I
I installed Python 3.5.1 to study machine learning
Mayungo's Python Learning Episode 8: I tried input
[Python] Learning Note 1
python learning output
Python learning site
Python learning day 4
Python Deep Learning
Python learning (supplement)
Deep learning × Python
python learning notes
I started machine learning with Python Data preprocessing
What I learned about AI / machine learning using Python (1)
Python class (Python learning memo ⑦)
Learning Python with ChemTHEATER 03
"Object-oriented" learning with python
Python module (Python learning memo ④)
Reinforcement learning 1 Python installation
Learning Python with ChemTHEATER 05-1
Python: Deep Learning Practices
Python ~ Grammar speed learning ~
Python: Unsupervised Learning: Basics
I tried Python> autopep8
Private Python learning procedure
I implemented Python Logging
Learning Python with ChemTHEATER 02
I tried deep learning
What I learned about AI / machine learning using Python (3)
Learning Python with ChemTHEATER 01
Relearn Python (Algorithm I)
[Python] I made a classifier for irises [Machine learning]
Mayungo's Python Learning Episode 1: I tried printing with print
Python: Deep Learning Tuning
Python + Unity Reinforcement Learning (Learning)
Python: Supervised Learning (Regression)
I tried Python> decorator
Class notation in Python
Why I chose Python
I compared Python more-itertools 2.5 → 2.6
What I learned about AI / machine learning using Python (2)
Python: Supervised Learning (Classification)
[Python] Get used to Keras while implementing Reinforcement Learning (DQN)
I started machine learning with Python Clustering & Dimension Compression & Visualization
What I learned about AI and machine learning using Python (4)
Mayungo's Python Learning Episode 3: I tried to print numbers with print
Effective Python Learning Memorandum Day 15 [15/100]
I tried fp-growth with python
I tried scraping with Python
Python exception handling (Python learning memo ⑥)
I wrote python in Japanese
curl -I python one liner
O'Reilly python3 Primer Learning Notes
Learning flow for Python beginners
Effective Python Learning Memorandum Day 6 [6/100]
Effective Python Learning Memorandum Day 12 [12/100]
Python: Supervised Learning: Hyperparameters Part 1
Python learning plan for AI learning
Effective Python Learning Memorandum Day 9 [9/100]
I made blackjack with python!