ν€μλ 맀κ°λ³μ μ¬μ©νκΈ°
ν€μλ 맀κ°λ³μ(keyword arguments)λ ν¨μ νΈμΆ μ 맀κ°λ³μμ μ΄λ¦μ λͺ μμ μΌλ‘ μ§μ ν΄ κ°μ μ λ¬ν©λλ€.
ν€μλ 맀κ°λ³μμ μ¬μ©
ν€μλ 맀κ°λ³μλ ν¨μ νΈμΆ μ 맀κ°λ³μ μ΄λ¦κ³Ό κ°μ ν¨κ» μ λ¬ν©λλ€.
ν€μλ 맀κ°λ³μ μ λ¬ λ°©μμ μμμ ꡬμ λ°μ§ μκ³ , ν¨μ νΈμΆμ μλλ₯Ό λͺ ννκ² ννν©λλ€.
ν€μλ 맀κ°λ³μ μ¬μ© μμ
def register_user(name, age, occupation): print(f"Name: {name}, Age: {age}, Occupation: {occupation}") # ν€μλ 맀κ°λ³μλ₯Ό μ¬μ©νμ¬ ν¨μ νΈμΆ register_user(name="CodeFriends", occupation="Engineer", age=20) # μΆλ ₯ κ²°κ³Ό : Name: CodeFriends, Age: 20, Occupation: Engineer
Guidelines
AI Tutor
Publish
Design
Upload
Notes
Favorites
Help
Code Editor
Run
Generate
Execution Result