Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def print_args(*args):
- for arg in args:
- print(arg)
- # Example usage
- print_args(1, 2, 3, 'hello', [1, 2, 3])
- def print_kwargs(**kwargs):
- for key, value in kwargs.items():
- print(f"{key}: {value}")
- # Example usage
- print_kwargs(name='Alice', age=30, city='New York')
Advertisement
Add Comment
Please, Sign In to add comment