CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2022
    Location
    Urbana, Illinios
    Posts
    11

    Python string find() examples

    I'm looking for examples, but I'm not finding any.
    Are there any examples on the internet? I'd like to know what it returns when it can't find something, as well as how to specify the starting and ending points, which I assume will be 0, -1.
    Code:
    >>> x = "Hello World"
    >>> x.find('World')
    6
    >>> x.find('Aloha');
    -1
    Could you please help me? But I'm not convinced.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,313

    Re: Python string find() examples

    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured