Posts

Showing posts with the label Docstrings

Python Tutorial 14 --- “Functions and Docstrings”

  Python Tutorial 14 --- “Functions and Docstrings” This PROGRAM or TUTORIAL is about Python’s “Functions and Docstrings” DOC “Functions in Python can be defined as lines of codes that are built to create a specific task and can be used again and again in a program when called.” There are two types of functions in the Python language: Built-in functions User-defined functions We have used a lot of built-in functions in our code till now, these functions include print(), or sum(), etc. So, we have a good idea about how to call a function. Built-in functions are already present in our python program, and we just have to call them whenever we need them to execute. Being familiar with built-in functions we will now look into User-defined function mostly in this tutorial. We must know how to define a function in Python in order to create one ourselves. We have to use the def keyword in order to define a function accompanied by the function's name with a pair of pare...