What does '\r' mean? What does it do? I have never seen it before and its giving me headaches. It doesnt seem to have any purpose, since 'a\ra' prints as 'aa', but its not the same as the string 'aa'. Im using python 2.6
It's an old control character from typewriters.
It means "carriage return". In this time, when you pressed "enter", you were going to the next line, then the carriage went back to the beginning of the line (hence the carriage return).
Then with computers, different OSes made different choices to represent new lines.
On windows, you have "\r\n" (carriage return + new line).
On unices, you have "\n" only (no need to do a carriage return, it was sort of implied by the new line).
On old mac OS, you had "\r" only.
Nowadays, it's not used except for newlines (or I don't know other usages).
What does this stand for?