python main and name

technical talkiess
0

 def vishalReturn(str):

    return f"This is the best strin here {str}"

def addSum(num1,num2):
    return num1+num2+num1

if you want to import the file and use the function in this file then all time unnessary below print satement is print so avoid the below unwanted satetment you can use the main__name__

if __name__ =='__main__':
    print(vishalReturn("Buddy"))
    o = addSum(5,6)
    print(o)
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)