Denis McMahon writes:
On Thu, 06 Nov 2014 15:14:05 +1100, Chris Angelico wrote:
On Thu, Nov 6, 2014 at 3:00 PM, Denis McMahon wrote:
def baseword(s):
find shortest sequence which repeats to generate s
return s[0:[.join([s[0:x]for k in range(int(len(s)/x)+1)])[0:len
(s)]for x in
Probably homework, you are a good man !
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Nov 5, 2014 at 10:58 PM, lordvita...@gmail.com wrote:
I have line 'pythonpythonpyth'. How do I know which word is the foundation
line?.
Other examples:
pythonpythonpyth is python
DOLORIUMD is DOLORIUM
HELLOLHELLO is HELLOL
thewordword is thewordword
I need to know whether the
lordvita...@gmail.com wrote:
I have line 'pythonpythonpyth'. How do I know which word is the foundation
line?. Other examples:
pythonpythonpyth is python
DOLORIUMD is DOLORIUM
HELLOLHELLO is HELLOL
thewordword is thewordword
I need to know whether the word in the text is repeated and get
On Wed, 05 Nov 2014 03:58:33 -0800, lordvital21 wrote:
I have line 'pythonpythonpyth'. How do I know which word is the
foundation line?.
Other examples:
pythonpythonpyth is python DOLORIUMD is DOLORIUM HELLOLHELLO is
HELLOL thewordword is thewordword
I need to know whether the word in the
On 2014-11-05 11:58, lordvita...@gmail.com wrote:
I have line 'pythonpythonpyth'. How do I know which word is the foundation
line?.
Other examples:
pythonpythonpyth is python
DOLORIUMD is DOLORIUM
HELLOLHELLO is HELLOL
thewordword is thewordword
I need to know whether the word in the text is
I thing this work:
stg='pythonpython'
foundationline=stg[ 0:( stg [ 1: ].index( stg[ 0 ])+1 ) ]
On 2014-11-05 11:58, lordvita...@gmail.com wrote:
I have line 'pythonpythonpyth'. How do I know which word is the foundation
line?.
Other examples:
pythonpythonpyth is python
DOLORIUMD is
On 2014-11-05 18:05, C@rlos wrote:
I thing this work:
stg='pythonpython'
foundationline=stg[ 0:( stg [ 1: ].index( stg[ 0 ])+1 ) ]
It doesn't work for the final example or barbaz.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 05 Nov 2014 18:49:01 +, MRAB wrote:
On 2014-11-05 18:05, C@rlos wrote:
I thing this work:
stg='pythonpython'
foundationline=stg[ 0:( stg [ 1: ].index( stg[ 0 ])+1 ) ]
It doesn't work for the final example or barbaz.
I have two algorithms I've implemented.
Still not sure
On Wed, 05 Nov 2014 18:49:01 +, MRAB wrote:
It doesn't work for the final example or barbaz.
Oh, and we really need a private python homework answers list where we
can discuss the most pythonic solution we can think of for all these
homework / coursework questions without showing the
On Thu, Nov 6, 2014 at 2:36 PM, Denis McMahon denismfmcma...@gmail.com wrote:
On Wed, 05 Nov 2014 18:49:01 +, MRAB wrote:
It doesn't work for the final example or barbaz.
Oh, and we really need a private python homework answers list where we
can discuss the most pythonic solution we can
On Thu, 06 Nov 2014 03:36:40 +, Denis McMahon wrote:
On Wed, 05 Nov 2014 18:49:01 +, MRAB wrote:
It doesn't work for the final example or barbaz.
Oh, and we really need a private python homework answers list where we
can discuss the most pythonic solution we can think of for all
On Thu, Nov 6, 2014 at 3:00 PM, Denis McMahon denismfmcma...@gmail.com wrote:
def baseword(s):
find shortest sequence which repeats to generate s
return s[0:[.join([s[0:x]for k in range(int(len(s)/x)+1)])[0:len
(s)]for x in range(1,len(s)+1)].index(s)+1]
That's hardly a PEP-8
On Thu, 06 Nov 2014 15:14:05 +1100, Chris Angelico wrote:
On Thu, Nov 6, 2014 at 3:00 PM, Denis McMahon denismfmcma...@gmail.com
wrote:
def baseword(s):
find shortest sequence which repeats to generate s
return s[0:[.join([s[0:x]for k in range(int(len(s)/x)+1)])[0:len
(s)]for x in
14 matches
Mail list logo