Could any of you lot tell me how to convert a string stored in avariable to a raw string? I know I create a raw string this way: spam = R'hello' But if I don't know what the string is going to contain, for example if I fetch from a Tkinter text-box to the variable 'eggs' and want to convert 'eggs' into a raw string.