Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   some questions (http://www.velocityreviews.com/forums/t319663-some-questions.html)

Andreas Bauer 07-14-2003 06:27 PM

some questions
 
Hi,

I need some information on how to deal with strings which I have
divided by using split(). I'm new to python and don't know how to
handle these split up strings.
And I some one could recommend a good tutorial I would be very
glad. Can't hardly find any.

Thanks in advance.

Andreas

Andreas Bauer 07-14-2003 07:14 PM

Re: some questions
 
Andreas Bauer wrote:

> Hi,
>
> I need some information on how to deal with strings which I have
> divided by using split(). I'm new to python and don't know how to
> handle these split up strings.
> And I some one could recommend a good tutorial I would be very
> glad. Can't hardly find any.
>
> Thanks in advance.
>
> Andreas


Could anybody tell me how to hide a varibale e.g. in a url
Example

for i in (0,5):
u = urllib.urlopen("http://www.versionxzy.com/page - here the variable e.g
page1,page2,page3...
-.html

thanks
Andi

Matt Gerrans 07-14-2003 07:14 PM

Re: some questions
 
"Andreas Bauer" wrote:
> I need some information on how to deal with strings which I have
> divided by using split(). I'm new to python and don't know how to
> handle these split up strings.


Hmm, doesn't that kind of depend on what you want to do with them?

> And I some one could recommend a good tutorial I would be very
> glad.


Where have you already looked? Have you tried "Python tutorial" on google?
Have you tried Python.org? Python itself comes with a tutorial (maybe you
are unaware of this, or maybe you want another?).

> Can't hardly find any.


Was ist das? Can't or can? Or do you really mean "Can't hardly find
nothin'?" ;-)



Skip Montanaro 07-14-2003 07:46 PM

Re: some questions
 

>> Have you tried Python.org? Python itself comes with a tutorial
>> (maybe you are unaware of this, or maybe you want another?).


Andreas> I know there is one. But I don't like it. Don't know what kind
Andreas> of tutorial I'm looking for. Just some hints would be enough.

Hint: http://www.python.org/doc/Newbies.html

Skip


Fredrik Lundh 07-14-2003 08:33 PM

Re: some questions
 
Andreas Bauer wrote:

> Could anybody tell me how to hide a varibale e.g. in a url
> Example
>
> for i in (0,5):
> u = urllib.urlopen("http://www.versionxzy.com/page
> - here the variable e.g page1,page2,page3.html


here's one way to do it:

for i in range(1, 5):
u = urllib.urlopen("http://www.versionxzy.com/page%d.html" % i)

more here:

http://www.python.org/doc/current/tut/node9.html
http://www.python.org/doc/current/li...q-strings.html

(reading the entire tutorial won't hurt, of course)

</F>

<!-- (the eff-bot guide to) the python standard library (redux):
http://effbot.org/zone/librarybook-index.htm
-->






All times are GMT. The time now is 09:50 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.