質問編集履歴

2

ミスを修正

2016/12/19 12:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -16,8 +16,6 @@
16
16
 
17
17
  for header in headers:
18
18
 
19
- print texX + header
20
-
21
19
  if string == texX + header:
22
20
 
23
21
  return True

1

間違っていたため修正

2016/12/19 12:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,27 +4,33 @@
4
4
 
5
5
 
6
6
 
7
- text = "=asdfg"
7
+ string = "=asdfg"
8
8
 
9
9
 
10
10
 
11
- def repl(text, header):
11
+ def repl(string, headers):
12
12
 
13
- for tex in text:
13
+ tex = ["=", "+"]
14
14
 
15
- for hed in header:
15
+ for texX in tex:
16
16
 
17
+ for header in headers:
18
+
19
+ print texX + header
20
+
21
+ if string == texX + header:
22
+
17
- return True
23
+ return True
18
24
 
19
25
  return False
20
26
 
21
27
 
22
28
 
29
+
30
+
23
- repl(text, "asdfg")
31
+ repl(string, ["asdfg"])
24
32
 
25
33
  #True
26
-
27
-
28
34
 
29
35
  ```
30
36