質問編集履歴
4
123
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2つのpyファイル間
|
1
|
+
2つのpyファイル間を変数hogeにより受け渡せるか?
|
test
CHANGED
File without changes
|
3
あdf
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,7 +8,9 @@
|
|
8
8
|
|
9
9
|
# main.py
|
10
10
|
|
11
|
+
|
12
|
+
|
11
|
-
```
|
13
|
+
```
|
12
14
|
|
13
15
|
# !/usr/bin/env python
|
14
16
|
|
@@ -17,6 +19,10 @@
|
|
17
19
|
import sub
|
18
20
|
|
19
21
|
print(sub.function.hoge)
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
|
20
26
|
|
21
27
|
|
22
28
|
|
2
あb
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,9 +6,13 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
+
# main.py
|
10
|
+
|
9
11
|
```ここに言語を入力
|
10
12
|
|
13
|
+
# !/usr/bin/env python
|
14
|
+
|
11
|
-
#
|
15
|
+
# coding: utf-8
|
12
16
|
|
13
17
|
import sub
|
14
18
|
|
@@ -18,6 +22,14 @@
|
|
18
22
|
|
19
23
|
# sub.py
|
20
24
|
|
25
|
+
|
26
|
+
|
27
|
+
```
|
28
|
+
|
29
|
+
# !/usr/bin/env python
|
30
|
+
|
31
|
+
# coding: utf-8
|
32
|
+
|
21
33
|
def function():
|
22
34
|
|
23
35
|
hoge = "this is test"
|
1
あ
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,8 +20,8 @@
|
|
20
20
|
|
21
21
|
def function():
|
22
22
|
|
23
|
-
hoge =
|
23
|
+
hoge = "this is test"
|
24
24
|
|
25
|
-
return
|
25
|
+
return hoge
|
26
26
|
|
27
27
|
```
|