Jay Jesus Amorin wrote:
Hi,
I'm a newbie trying to learn python. Kindly help me on string formatting.
test = https://www.localhost.org/testmodule/dev/trunk/admin/sql/mytest.sql
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()
print("2. testmodule")
print()
print("3. /dev/trunk/admin/sql/mytest.sql")
If that is not what you are looking for please explain.
--
Bob Gailer
Chapel Hill NC
919-636-4239
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor