dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
1.9 KiB
1.9 KiB
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 6a1d9f98e819ed70a0e994dc | Challenge 330: lowercase words | 29 | challenge-330 |
--description--
Given a string, return only the words that are entirely lowercase, in their original order and with a space between each word.
--hints--
get_lowercase_words("hello GOOD world") should return "hello world".
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_lowercase_words("hello GOOD world"), "hello world")`)
}})
get_lowercase_words("these are all lowercase") should return "these are all lowercase".
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_lowercase_words("these are all lowercase"), "these are all lowercase")`)
}})
get_lowercase_words("less is NoT more") should return "less is more".
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_lowercase_words("less is NoT more"), "less is more")`)
}})
get_lowercase_words("DonT eat pizza every OTHER day") should return "eat pizza every day".
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_lowercase_words("DonT eat pizza every OTHER day"), "eat pizza every day")`)
}})
get_lowercase_words("the Super quick AND snEaky brown fox Leapt anD jumped over aNd AROUND the lazy SloW dog") should return "the quick brown fox jumped over the lazy dog".
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_lowercase_words("the Super quick AND snEaky brown fox Leapt anD jumped over aNd AROUND the lazy SloW dog"), "the quick brown fox jumped over the lazy dog")`)
}})
--seed--
--seed-contents--
def get_lowercase_words(s):
return s
--solutions--
def get_lowercase_words(s):
return " ".join(word for word in s.split(" ") if word == word.lower())