Answers for "doc strings python"

1

doc strings python

def calculator(a,b):
    """This function add's the input from user"""
    return a + b
#here in the above function from the start to the ending of double colon is a doc string
#we can say docstrings are description of your python function
print(calculator(5,5))
Posted by: Guest on June-26-2021
10

python function docstring

def functionName():
    """
    This is a function docstring
    """
Posted by: Guest on February-21-2020
3

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()
Posted by: Guest on November-22-2020

Python Answers by Framework

Browse Popular Code Answers by Language