Python *args and **kwargs — Data Science Edition

[This article was first published on Python – Better Data Science, and kindly contributed to python-bloggers]. (You can report issue about the content on this page here)
Want to share your content on python-bloggers? click here.

Make your code more elegant with arguments and keyword arguments If you’ve ever stumbled upon *args and **kwargs after looking at a function definition and wondered what the heck those are, you’re at the right place. Today we’ll go through both and show their use cases in your average machine learning task. Both *args and *kwargs allow you to pass multiple arguments (hence args) and keyword arguments (hence kwargs) to a function. We’ll explore this in much more details in a minute. The ideal reader is someone familiar with the basics of Python programming language and interested in data science. […]

The post Python *args and **kwargs — Data Science Edition appeared first on Better Data Science.

To leave a comment for the author, please follow the link and comment on their blog: Python – Better Data Science.

Want to share your content on python-bloggers? click here.