Swarm-readme-18.py
· 302 B · Python
原始檔案
def greet(name, age: int, location: str = "New York"):
"""Greets the user. Make sure to get their name and age before calling.
Args:
name: Name of the user.
age: Age of the user.
location: Best place on earth.
"""
print(f"Hello {name}, glad you are {age} in {location}!")
1 | def greet(name, age: int, location: str = "New York"): |
2 | """Greets the user. Make sure to get their name and age before calling. |
3 | |
4 | Args: |
5 | name: Name of the user. |
6 | age: Age of the user. |
7 | location: Best place on earth. |
8 | """ |
9 | print(f"Hello {name}, glad you are {age} in {location}!") |