質問するログイン新規登録

回答編集履歴

1

追記

2017/08/03 13:29

投稿

LouiS0616
LouiS0616

スコア35678

answer CHANGED
@@ -8,4 +8,9 @@
8
8
 
9
9
  moji = 'hogehoge'
10
10
  slice_print(moji, (1, 4))
11
- ```
11
+ ```
12
+
13
+ ---
14
+ 世界は広いです。似たような質問がありました。
15
+ [https://stackoverflow.com/questions/28652976/passing-array-range-as-argument-to-a-function](https://stackoverflow.com/questions/28652976/passing-array-range-as-argument-to-a-function)
16
+ > Python accepts the 1:5 syntax only within square brackets. The interpreter converts it into a slice object. The __getitem__ method of the object then applies the slice.