Hello, all. This is probably embarrassingly basic, but I haven't been able to find something that works.

I'm working on a script that needs to manipulate a list (not 'list' in the Python sense) of URLs returned in a server response. Right now, I'm stripping the XML tags from that response and assigning the resulting list of URLs to a variable so I can print it in the terminal. So when I do, say, 'print urls' I get something like this:

        http://server.com/thing1
        http://server.com/thing2
        http://server.com/thing3

And so on. What I would _like_ to do is assign each line of that list to a separate variable, so that I can format my output to be more explicit; something like this:

        Link to Thing1: http://server.com/thing1
        Link to Thing2: http://server.com/thing2

And so on. I know this should be extremely easy, but I appear to be having some manner of mental block. Any and all guidance would be greatly appreciated; many thanks in advance.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to