James Hofmann <[EMAIL PROTECTED]> wrote:
> Malcolm Wooden dtptypes.com> writes:
>>
>> I'm trying to get my head around Python but seem to be failing miserably. I
>> use RealBasic on a Mac and find it an absolute dream! But PythonUGH!
>>
>> I want to put a sentence of words into an array, eg
Malcolm Wooden dtptypes.com> writes:
>
> I'm trying to get my head around Python but seem to be failing miserably. I
> use RealBasic on a Mac and find it an absolute dream! But PythonUGH!
>
> I want to put a sentence of words into an array, eg "This is a sentence of
> words"
>
> In RB it
Malcolm Wooden wrote:
> Yes Sergei, as 3 of the lines are Dim statements, the real code is just 4
> lines, a totally logical. It's not the amout of code thats a probelm, it's
> following the logic and structure thats important. As I said Python.. UGH!
>
> Malcolm
>
Yes, the weirdest thing about
Malcolm Wooden wrote:
(top post corrected)
>
> "John Machin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Malcolm Wooden wrote:
>>
(snip useless rant)
>>>
>>>I want to put a sentence of words into an array, eg "This is a sentence
>>>of words"
>>>
>>>In RB it would be simple
Malcolm Wooden wrote:
> I'm trying to get my head around Python but seem to be failing miserably. I
> use RealBasic on a Mac and find it an absolute dream! But PythonUGH!
Strange enough, Rb was one of my first languages, and last time I played
with it, I founhd it was close to a nightmare whe
Malcolm Wooden dtptypes.com> writes:
> I want to put a sentence of words into an array, eg "This is a sentence of
> words"
>
> In RB it would be simple:
>
> Dim s as string
> Dim a(-1) as string
> Dim i as integer
>
> s = "This is a sentence of words"
> For i = 1 to CountFields(s," ")
> a.a
Malcolm Wooden dtptypes.com> writes:
> Yes Sergei, as 3 of the lines are Dim statements, the real code is just 4
> lines, a totally logical. It's not the amout of code thats a probelm, it's
> following the logic and structure thats important. As I said Python.. UGH!
Since I both use RB and Pyt
Hi Malcolm,
> It's not the amout of code thats a probelm, it's following the
> logic and structure thats important.
> As I said Python.. UGH!
Do you find
.. s = "This is a sentence of words"
.. a = s.split(' ')
less readable or logical than
.. s = "This is a sentence of words"
.. For i = 1
Yes Sergei, as 3 of the lines are Dim statements, the real code is just 4
lines, a totally logical. It's not the amout of code thats a probelm, it's
following the logic and structure thats important. As I said Python.. UGH!
Malcolm
"Sergei Organov" <[EMAIL PROTECTED]> wrote in message
news:[E
Malcolm Wooden wrote:
> my actual code is:
>
> for x in range(len(l)):
> h = string.split(l[x])
>
> where the sentence string is in an array of one element 'l'
> Error is:
>
> Traceback (most recent call last):
> File "", line 34, in ?
> File "", line 27, in SentenceText
> File "C:\P
Malcolm Wooden wrote:
> my actual code is:
>
> for x in range(len(l)):
> h = string.split(l[x])
>
> where the sentence string is in an array of one element 'l'
> Error is:
>
> Traceback (most recent call last):
> File "", line 34, in ?
> File "", line 27, in SentenceText
> File "C:\P
my actual code is:
for x in range(len(l)):
h = string.split(l[x])
where the sentence string is in an array of one element 'l'
Error is:
Traceback (most recent call last):
File "", line 34, in ?
File "", line 27, in SentenceText
File "C:\PYTHON22\lib\string.py", line 122, in split
Malcolm Wooden wrote:
> Sorry John but that don't do it for me. Just get errors comming back
>
>
> "John Machin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>
>s = "This is a sentence of words"
>a = s.split()
>a
>>
>>['This', 'is', 'a', 'sentence', 'of', 'words
Sorry John but that don't do it for me. Just get errors comming back
"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Malcolm Wooden wrote:
>> I'm trying to get my head around Python but seem to be failing miserably.
>> I use RealBasic on a Mac and find it an absolute
"Malcolm Wooden" <[EMAIL PROTECTED]> writes:
> I'm trying to get my head around Python but seem to be failing miserably. I
> use RealBasic on a Mac and find it an absolute dream! But PythonUGH!
>
> I want to put a sentence of words into an array, eg "This is a sentence of
> words"
>
> In R
Malcolm Wooden wrote:
> I'm trying to get my head around Python but seem to be failing miserably. I
> use RealBasic on a Mac and find it an absolute dream! But PythonUGH!
>
> I want to put a sentence of words into an array, eg "This is a sentence of
> words"
>
> In RB it would be simple:
>
Malcolm Wooden wrote:
> I'm trying to get my head around Python but seem to be failing miserably. I
> use RealBasic on a Mac and find it an absolute dream! But PythonUGH!
>
> I want to put a sentence of words into an array, eg "This is a sentence of
> words"
>
> In RB it would be simple:
>
Malcolm Wooden wrote:
>In RB it would be simple:
>
>Dim s as string
>Dim a(-1) as string
>Dim i as integer
>
>s = "This is a sentence of words"
>For i = 1 to CountFields(s," ")
> a.append NthField(s," ",i)
>next
>
>That's it an array a() containing the words of the sentence.
>
>Now can I see how
18 matches
Mail list logo