![]() |
Creating dynamic strings
I'm wondering if there's a way to create a string that will allow % plus arguments to follow. So basically splitting up
:
print "this is a string %s"%("this is another string")In to two parts, allowing the first to be dynamic. This is an example of how you would do it with your own function. :
def dyn_string(x, d):Is there a built in method for the same result? Idealy I'd like it to work like so: :
x = "this is a string %s"I want this so I can take a dynamic template and stick in specific values appropriately. |
| All times are GMT -5. The time now is 9:14 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC