How to call print once disabled?

Does anyone know how to call the print function once it’s been disabled with this declaration?

print = function() end

I want to disable print in sections of my code for debugging without commenting out each individual line and I can’t figure out how.

Thanks,

Nail

first save print to a variable

oldPrint = print

then to get rid of print

print = function() end

then to restore

print = oldPrint

Nice! 

Thanks for that jstrahan

welcome

first save print to a variable

oldPrint = print

then to get rid of print

print = function() end

then to restore

print = oldPrint

Nice! 

Thanks for that jstrahan

welcome