Monday, July 19, 2010

WOO HOO! Python Rulz Problem Solved

I figured out the issue with the string to list modify and list to string:

>>>mystring = "HELLO"

>>>mylist = list(mystring)

>>>print mylist

['H', 'E', 'L', 'L', 'O']

>>>mystring2 = "".join(mylist) <---- This was the ace in the hole!

>>>print mystring2

HELLO

Thank you .join!!!

No comments:

Post a Comment