human
How can I tell if a string only contains letter AND spaces
assistant
Here is some code to check if string 'a b' only contains letters and spaces

"""a b""".replace(' ', '').isalpha()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.