Guidelines

ν‚€μ›Œλ“œ λ§€κ°œλ³€μˆ˜ μ‚¬μš©ν•˜κΈ°

ν‚€μ›Œλ“œ λ§€κ°œλ³€μˆ˜(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