디폴트 파라미터
-
Python Chapter08방뚝딱 학습노트 2023. 10. 29. 19:08
교재 : 멘토씨리즈 파이썬 디폴트 파라미터 입력 파라미터를 따로 주지 않는 경우에도 함수를 호출할 수 있게 합니다. 일반적으로 어떤 한개의 파라미터가 값을 가지게 되면 다른 파라미터가 디폴트 파라미터로 사용하곤 합니다. 메서드 메서드는 특정 객체가 가지고 있는 함수를 의미합니다. 특정 자료형에 포함되어 있는 함수라고 볼 수 있습니다. 독자적으로 쓰는 함수 : print(), round(), input() 함수와 메서드는 같은 개념이지만 차이가 있다면 함수는 독립적으로 호출 할 수 있으면 메서드는 특정 객체를 통해서만 호출할 수 있습니다. 포함되어 있어 독자적으로 쓰지 못하는 함수 : .함수 num1,num2 = input().split() String 인덱싱, 슬라이싱이 가능하다 값을 수정할 수 있다. ..