質問編集履歴

2

情報をついかしました。

2018/09/12 06:10

投稿

tetukou
tetukou

スコア16

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,37 @@
8
8
 
9
9
  ### 発生している問題・エラーメッセージ
10
10
 
11
+ ↓はファイルのコード?です。
11
12
 
13
+ def main_gen(n) :
14
+
15
+ yield"start"
16
+
17
+ yield from range(n,0,-1)
18
+
19
+ yield from "abc"
20
+
21
+ yield from [10,20,30]
22
+
23
+ yield from sub_gen()
24
+
25
+ yield "end"
26
+
27
+
28
+
29
+ def sub_gen() :
30
+
31
+ yield "x"
32
+
33
+ yield "y"
34
+
35
+ yield "z"
36
+
37
+
38
+
39
+
40
+
41
+ ↓はanaconda promptにインポートしようとしたものです。
12
42
 
13
43
  ```
14
44
 

1

エラーメッセージに誤植があったのでなおしました。

2018/09/12 06:10

投稿

tetukou
tetukou

スコア16

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  Tranceback (most recent call last):
18
18
 
19
- File "<studin>",line1,in <module>
19
+ File "<stdin>",line1,in <module>
20
20
 
21
21
  ModuleNotFoundError:No module named'subgenerator'
22
22