I have a python script who is returning 2 values, humidity and temperature:
Temperature: 1.58050537109
Humidity: 89.2761230469
I call this srcipt from a PHP page but only one value is printed
<?php
echo exec("sudo python /home/pi/sht/sht31.py 2>&1");
?>
and only one humidity is printed. Could you please help me to print both value ? Thank you