728x90 def 함수1 def 함수 활용하는 방법 def 함수 활용 1. 축약할 때 def 인사() : print('Let me introduce myself my name is Jaeseungshot') print('I go to Edong elementary school I'm in 4th grade') 이렇게 입력하면 앞으로는 인사() 만 입력해도 Let me introduce myself my name is Jaeseungshot I go to Edong elementary school I'm in 4th grade 이렇게 출력되는 것을 확인할 수 있다. 아주 간편하게 축약할 수 있는 것이다. 2. 함수 만들 때 def 내년(현재년도) : print(현재년도 + 1) 이렇게 입력 후 내년(2022) 를 입력하면 2023이 출력되는 것을 확인할 수.. 2022. 5. 13. 이전 1 다음 반응형