Actually - I'd suggest that the Python mailing list isn't the right place
either.

It sounds like the problem you're describing is called the Longest Repeated
Substring problem:

http://en.wikipedia.org/wiki/Longest_repeated_substring_problem

The solution to this problem is well known, and O(n) - you use a suffix
tree. Python doesn't have a built-in suffix tree (that I'm aware of), but
it's a relatively simple task to build one using primitives that Python
provides.

Yours,
Russ Magee %-)

On Wed, Nov 5, 2014 at 7:50 PM, Denis Darii <dnxde...@gmail.com> wrote:

> Vitaly feel free to look on https://www.python.org/ for a solution to
> your issue and please keep only django related questions in this "Django
> users" group.
> Thank you.
> Denis.
>
> On 5 November 2014 12:41, Віталій Лисенко <lordvita...@gmail.com> wrote:
>
>> Sorry. I asked the question incorrectly.
>> Example.
>> I line 'pythonpythonpyth'. How do I know which word is the foundation
>> line?.
>> Other examples:
>> "DOLORIUMD" --> rigth answer DOLORIUM
>> "HELLOL" --> HELLOL
>> "thewordword" --> thewordword
>>
>> I need to know whether the word in the text is repeated and get it. This
>> will be the key.
>>
>> On 5 November 2014 13:22, Rafael E. Ferrero <rafael.ferr...@gmail.com>
>> wrote:
>>
>>> a.find('python')
>>>
>>>
>>> --
>>> Rafael E. Ferrero
>>>
>>> 2014-11-05 8:16 GMT-03:00 Віталій Лисенко <lordvita...@gmail.com>:
>>>
>>>> How to find the word 'python' in string 'pythonpythonpythonpyth'?
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/django-users.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/5cb8f985-b3aa-4df7-aed7-6a1859e7a87c%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/5cb8f985-b3aa-4df7-aed7-6a1859e7a87c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/xNEunhaILUI/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAJJc_8X3nEz5t7TF6cJ4thQOt5T8SLCqLpCE6xS-tT7sR7832g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAJJc_8X3nEz5t7TF6cJ4thQOt5T8SLCqLpCE6xS-tT7sR7832g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Best regards Vitaly Lysenko from village Markove (Ukraine)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJJKi7dz45x0sf7vBRyOOTOwr6F_Tu3bbwv0o4wzEtsWUVe-%3DA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJJKi7dz45x0sf7vBRyOOTOwr6F_Tu3bbwv0o4wzEtsWUVe-%3DA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> I'm using Linux because i'm freedom dependent.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGyQdPrip8ccCmX9LjTLu55BmNmhZHNbvKf-MiRmG%2BZyPmo9Hg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGyQdPrip8ccCmX9LjTLu55BmNmhZHNbvKf-MiRmG%2BZyPmo9Hg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJxq84_j39%2BG4G0MONUKNB12qVv-Y6TOYCAgAnB0GPHxmr%3Dkqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to