Hi Surya,

On 8 December 2011 11:19, surya k <sur...@live.com> wrote:
>
> >>>astr.find(str1, beg=0, end=3)
> This is showing the following error
> Traceback (most recent call last):  File "<interactive input>", line 1, in
> <module>TypeError: find() takes no keyword arguments
>

See the documentation for the str.find() method here:
http://docs.python.org/release/2.5.2/lib/string-methods.html

The error says that find() does not take any keyword arguments, and you've
supplied 2, (namely, "beg" and "end".) So, try calling find() without
trying to specify beg and end as keyword (e.g. named as you've done)
arguments.

Also read up on keyword arguments (and arguments in general):
http://docs.python.org/release/1.5.1p1/tut/keywordArgs.html

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

Reply via email to