Hello, I have a function which currently prints the contents of an object to the console. I want pass the function an arguement so that instead of always printing the object to the console it.
a) prints contents of object to console
or
b) prints contents of object to file
depending what input the print function is given.
Now, I know I can just pass the function an open file to print to. What can I pass instead of an open file to make the function print to the console?
THanks,
Jonathan
a) prints contents of object to console
or
b) prints contents of object to file
depending what input the print function is given.
Now, I know I can just pass the function an open file to print to. What can I pass instead of an open file to make the function print to the console?
THanks,
Jonathan
Comment