Setting both UART pins to LOW from python

In a UART line one of the pins on the Beaglebone Black is configured to HIGH in an idle state when it is not sending anything. However, for my project I need both UART pins to be low when I am not using them. A possible solution would be reconfiguring those pins to GPIO every single time and setting them to LOW, but are there simpler and more efficient ways to set them to LOW multiple times? What is the best way of doing that directly from python?

If it is in UART mode it will idle ‘high’ by definition.
It is how the serial protocol works.
If there is a serial UART involved, you should revisit your requirements.
Or you could add an inverter on both ends and run the protocol upside down, sort of like RS-232 does.
— Graham