Python Make String One Line

s = "a\nb\nc\nd\n"
t = str.join(" ", s.splitlines())
#output "a b c d"
Tough Tarsier