0
1

More than 3 years have passed since last update.

スライスで1つ飛ばし

Posted at

※だいぶざっくりとしてるのでコメントwelcomeです

スライスには引数が3つ埋め込めるらしい。
始点、終点、飛ばし数の3つ。
2つだけだと思ってました。
そもそも引数っていう言い方が違う気がする。

cf) 他の方のQiita記事

a = [1,2,3,4,5,6,7,8,9]
print(a[1::2])

これで[2,4,6,8]と出力された。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1