---
id: 69c5f3d787b1725d5f00c8b8
title: "Challenge 254: Odd Words"
challengeType: 29
dashedName: challenge-254
---

# --description--

Given a string of words, return only the words with an odd number of letters.

- Words in the given string will be separated by a single space.
- Return the words separated by a single space.

# --hints--

`get_odd_words("This is a super good test")` should return `"a super"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_odd_words("This is a super good test"), "a super")`)
}})
```

`get_odd_words("one two three four")` should return `"one two three"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_odd_words("one two three four"), "one two three")`)
}})
```

`get_odd_words("banana split sundae with rainbow sprinkles on top")` should return `"split rainbow sprinkles top"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_odd_words("banana split sundae with rainbow sprinkles on top"), "split rainbow sprinkles top")`)
}})
```

`get_odd_words("The quick brown fox jumped over the lazy river")` should return `"The quick brown fox the river"`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_odd_words("The quick brown fox jumped over the lazy river"), "The quick brown fox the river")`)
}})
```

# --seed--

## --seed-contents--

```py
def get_odd_words(s):

    return s
```

# --solutions--

```py
def get_odd_words(s):
    return ' '.join(word for word in s.split(' ') if len(word) % 2 == 1)
```
