On Jul 17, 9:50 am, Alexnb:
> how can I test to see if  the first char of a string is "<"?

I suggest you to try the interactive shell:

>>> "hello"[0]
'h'
>>> "hello"[0] == "<"
False
>>> "hello"[0] == "h"
True
>>> "hello".startswith("h")
True

Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to