I want to have a string with the
my_string = 'asdfg'
my_string = 'a\ws\wd\wd\wf\wg\w'
for i in my_string:
\w is not a character. You might be thinking of another escape character, but
'\w' simply evaluates to
\w just doesn't exist.
Oh, you might also want to replace your for loop with simply
tuple(my_string) - or even the entire thing with
'[whatever character you actually wanted]'.join(my_string) - it's simpler and does the same thing. To get your expected result, you'll also need to add the character to the end of the string, as in
'[x]'.join(my_string) + '[x]'. As it stands now, you won't get the character after the very last letter.