I don't know of a page that delivers a single-line answer. There are a number of pages like whatsmyua and whatsmyuseragent, or you can just ask Google my user agent. None of these seem bloated with adds or graphics—but they all do require a trivial bit of parsing. For example:
>>> page = requests.get('http://whatsmyuseragent.org/')
>>> soup = BeautifulSoup(page.text, 'lxml')
>>> print(soup.p.text)
python-requests/2.18.4
See it in action at repl.it.
However, there may not be much point in doing this.
Asking for your IP is useful, because your computer may not know its own public IP. For example, I'm behind a NAT router, so my computer thinks it's at 10.0.1.100, but my router forwards my requests as some other dynamic IP address assigned by my ISP. So, if I want to give you my address to connect to me, I need to ask my router, or ask someone on the internet what they see when I connect.
Asking for your user agent is not likely to be as useful. Even if you're behind a transparent proxy on a work or school network, very few of them are configured to change your user agent. So, your user agent is almost certainly going to be whatever you set it to, or whatever the defaults are for the library you use—see John Gordon's answer for requests
.