Horje
Python Docstrings Example Code Example
docstrings in python
# Docstrings are used create your own Documentation for a function or for a class
# we are going to write a function that akes a name and returns it as a title.
def titled_name(name):
  # the following sting is Docstring
  """This function takes name and returns it in a title case or in other
  words it will make every first letter of a word Capitalized"""
  return f"{name}".title()
python get function docstring
help(functionName)
Python Docstrings Example
Python Docstrings Example
def Add(a,b):
    '''Takes two number as input and returns sum of 2 numbers'''
    return a+b
python docstring use
def function1():
   """
   :docstring- tells about program,what the program contains
   """




Python

Related
configparser error reading relative file path Code Example configparser error reading relative file path Code Example
web socket in python Code Example web socket in python Code Example
pandas dataframe compare two dataframes and extract difference Code Example pandas dataframe compare two dataframes and extract difference Code Example
pyton get minimum value of array Code Example pyton get minimum value of array Code Example
get the first item in a list in python 3 Code Example get the first item in a list in python 3 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7