Whoah, that's a nifty trick.
Thanks.
rick
--
http://mail.python.org/mailman/listinfo/python-list
Try something like:
def capwords(words):
return ' '.join([x.capitalize() for x in words.split()])
capwords("here's my title!")
"Here's My Title!"
--
Jesse Hager
email = "[EMAIL PROTECTED]".decode("rot13")
--
http://mail.python.org/mailman/listinfo/python-list
Allan wrote:
> Hi All -
>
> We're developing in Python 2.4.3 and are noticing something strange.
I'm noticing strange semicolons in your code... ;)
> For example, when testing, here's what we're seeing:
>
> x = "here's my title!";
> x = x.title();
> print x;
> Here'S My Title!
>
> Notice the c
Hi All -
We're developing in Python 2.4.3 and are noticing something strange.
For example, when testing, here's what we're seeing:
x = "here's my title!";
x = x.title();
print x;
Here'S My Title!
Notice the capitalization -- "Here'S".
Any feedback on this issue is much appreciated.
Thanks much,