给定两个字符串，使用Python编写一个程序，判断它们是否为回文字符串。
a = "racecar", b = "hello world"
```python
def is_palindrome(word):
    return word == word[::-1]

a = "racecar"
b = "hello world"

if is_palindrome(a):
    print(a, "is a palindrome")
else:
    print(a, "is not a palindrome")

if is_palindrome(b):
    print(b, "is a palindrome")
else:
    print(b, "is not a palindrome")
```

输出结果为：

```
racecar is a palindrome
hello world is not a palindrome
```