String python Remova o espaço em branco e as novas linhas

' '.join(myString.split())
Index out of bounds