回答編集履歴

3

変数名の変更

2016/10/19 17:30

投稿

toritoritorina
toritoritorina

スコア972

test CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  pre_char = a[0][start_index-1]
8
8
 
9
- after_char = a[0][start_index+len(b[1])]
9
+ post_char = a[0][start_index+len(b[1])]
10
10
 
11
- print pre_char, after_char # a d
11
+ print pre_char, post_char # a d
12
12
 
13
13
  ```
14
14
 
@@ -48,9 +48,9 @@
48
48
 
49
49
  pre_char = a[0][start_index-1]
50
50
 
51
- after_char = a[0][start_index+len(b[0])]
51
+ post_char = a[0][start_index+len(b[0])]
52
52
 
53
- print pre_char, after_char
53
+ print pre_char, post_char
54
54
 
55
55
 
56
56
 

2

変数名の修正

2016/10/19 17:30

投稿

toritoritorina
toritoritorina

スコア972

test CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  start_index = a[0].find(b[1])
6
6
 
7
- pre_string = a[0][start_index-1]
7
+ pre_char = a[0][start_index-1]
8
8
 
9
- after_string = a[0][start_index+len(b[1])]
9
+ after_char = a[0][start_index+len(b[1])]
10
10
 
11
- print pre_string, after_string # a d
11
+ print pre_char, after_char # a d
12
12
 
13
13
  ```
14
14
 
@@ -46,11 +46,11 @@
46
46
 
47
47
  start_index = match.start()
48
48
 
49
- pre_string = a[0][start_index-1]
49
+ pre_char = a[0][start_index-1]
50
50
 
51
- after_string = a[0][start_index+len(b[0])]
51
+ after_char = a[0][start_index+len(b[0])]
52
52
 
53
- print pre_string, after_string
53
+ print pre_char, after_char
54
54
 
55
55
 
56
56
 

1

修正

2016/10/19 17:28

投稿

toritoritorina
toritoritorina

スコア972

test CHANGED
@@ -48,7 +48,7 @@
48
48
 
49
49
  pre_string = a[0][start_index-1]
50
50
 
51
- after_string = a[0][start_index+len(b[1])]
51
+ after_string = a[0][start_index+len(b[0])]
52
52
 
53
53
  print pre_string, after_string
54
54