Alexandr N Zamaraev wrote:
>Excellent! it works. But I have one more question. How can I test to see if
Alexnb wrote:1) if string really '--a href="/browse/brick"--brick--/a--'>>>>>s = '--a href="/browse/brick"--brick--/a--'
>s
'--a href="/browse/brick"--brick--/a--'
>''.join('<%s>' % l if i % 2 == 1 else l for i, l in
enumerate(s.split('--')))
' /browse/brick brick '
I'm sorry, I don't think I was being clear. I replaced the <'s with -- so
it
would post online w/o actually making a link. I just need to know how to
get
the "brick" out.brick>>s.split('--', 3)[2]
2) if string ' /browse/brick brick 'brick>>s.split('>', 1)[1].split('<')[0]
--
http://mail.python.org/mailman/listinfo/python-list
the first character of a string is what I want, for example, how can I test
to see if the first char of a string is "<"?
--
View this message in context: http://www.nabble.com/Getting-a-unkn...p18503367.html
Sent from the Python - python-list mailing list archive at Nabble.com.