"Vineeth Rakesh" <vineethrak...@gmail.com> wrote

How to return the position of a character in a string. Say I have str1 =
"welcome to the world" if i want to return the position of the first
occurrence of "o" how to do it?

Others have answered but don't forget Python's help() facility.

help(str)

Would have probably got your answer a lot faster than posting a
question and waiting for replies.

We don't mind helping but for these kinds of question its usually
quicker to try a help(), dir() or even a Google search first. It saves
your time and ours.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to