I usually prefer using `strip`. It not only cuts off the newline, but it can also gets rid of leading / trailing spaces.