Skip to content

Commit 180fe72

Browse files
committed
start ch4
1 parent ad23480 commit 180fe72

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import sys
2+
3+
def main():
4+
for arg in sys.argv[1:]:
5+
print(arg)
6+
7+
if __name__ == "__main__":
8+
main()

4장_구조와_모듈/hello.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
hello = "hello"
2+
3+
def world():
4+
return "world"
5+
6+
if __name__ == '__main__':
7+
print(f"{__name__} 직접 실행됨.")
8+
else:
9+
print(f"{__name__} 임포트 됨.")

0 commit comments

Comments
 (0)