[Tutor] string fomatting
Jay Jesus Amorin
jay.amorin at gmail.com
Sat Jan 31 19:44:02 CET 2009
I want to search any characters in test after
the search will end after it finds another /
and when i print it will display *testmodule*.
On Sun, Feb 1, 2009 at 2:29 AM, bob gailer <bgailer at gmail.com> wrote:
> Jay Jesus Amorin wrote:
>> I'm a newbie trying to learn python. Kindly help me on string formatting.
>> test =
>> what will i use to print this output?
>> 1, https://www.localhost.org/
>> 2. testmodule
>> 3. /dev/trunk/admin/sql/mytest.sql
>> Oh now I get it. I thought that you had posted code at that site. Now I
> think you want to do something to the string
> " https://www.localhost.org/testmodule/dev/trunk/admin/sql/mytest.sql"
> Too bad you did not put it in quotes!
> It is not clear as to how "string formating" applies to this question.
> The obvious answer is:
> print("1, https://www.localhost.org/""
> print("2. testmodule")
> print("3. /dev/trunk/admin/sql/mytest.sql")
> If that is not what you are looking for please explain.
> Bob Gailer
> Chapel Hill NC
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor