import sys sys.path.append("../../chapter4/mod") from syaku import syaku_to_cm as s2cm print("15尺=", s2cm(15), "cm") print("30尺=", s2cm(30), "cm")
#モジュールのインポート from syaku import syaku_to_cm as s2cm print("10尺=", s2cm(10), "cm") print("20尺=", s2cm(20), "cm")
# 特定メンバだけをインポート from syaku import syaku_to_cm as s2cm print("1.27尺=", s2cm(1.27), "cm") print("20尺=", s2cm(20), "cm")
#特定のメンバだけをインポート from syaku import syaku_to_cm as s2cm print(s2cm(10)) print(s2cm(20)) print(__name__)
from syaku import syaku_to_cm print("10尺=", syaku_to_cm(10), "cm") print("20尺=", syaku_to_cm(20), "cm") import syaku as sya print(sya.syaku_to_cm(10)) from syaku import syaku_to_cm as s2cm print(s2cm(10)) import random, datetime, json from syaku import syaku_to_cm, test1, test2 from syaku import syaku_to_cm as s2c, test1 as t1, test2