I am calling a function and passing 3 parameters to that. I am taking each parameter one be one and performing some operations on that. At the end i am traversing the loop so as to perform the same operations on the rest of the parameters.
Suppose the problem is like this:
print "Starting the operations";
# calling the function say NetworkMode
NetworkMode(SONET,SDH,SDH-J) #This will perform certain steps
print "Ending of the test case"
Output i want should come like this:
#Starting the operaions
#Whatever the output function will give using first parameter
#Ending the test case
#Starting the operaions
#Whatever the output function will give using second parameter
#Ending the test case
#Starting the operaions
#Whatever the output function will give using third parameter
#Ending the test case
Is there any way i can do that.
If you call one single function [once], then you get one chance to print out a result; if you want to print out once per parameter, then the function itself is going to have to do the printing out as it operates on each parameter. If, however, you’re repeating the exact same steps on each parameter then perhaps your function should only take one parameter?