Professional Documents
Culture Documents
Python For Og Lecture 72 - Doc String
Python For Og Lecture 72 - Doc String
Python For Og Lecture 72 - Doc String
Website - https://petroleumfromscratchin.wordpress.com/
LinkedIn - https://www.linkedin.com/company/petroleum-from-scratch
YouTube - https://www.youtube.com/channel/UC_lT10npISN5V32HDLAklsw
# Let say I have created a function and someone else is seeing my code
def por_conv(p):
''' This function takes porosities values in fraction and convert them into percentage'''
return p*100
por_conv(0.28)
/
2/3/2021 Python for O&G Lecture 72: Doc string - Colaboratory
# why we use doc string -- to make it easy for user to understand what my funtion actually do
28.000000000000004
# print(functionname.__doc__)
print(por_conv.__doc__)
This function takes porosities values in fraction and convert them into percentage
print(all.__doc__)
l = []
all(l)
True
/
2/3/2021 Python for O&G Lecture 72: Doc string - Colaboratory