+ 13
[Challenge] Word in Word.
Write a program which will accept a line of text and tell you if any of the words appear within any of the other words in the line. Word's length must greater than 1. Here is an example: Input: There is a palm tree on the island. Output: "is" appears in "island" "the" appears in "there" Another example: Input: He is saying hello to his brother. Output: "he" appears in "hello" and "brother" "is" appears in "his" Happy coding!
18 ответов
+ 20
Thank you for nice challenge 😊
Here's my try:
https://code.sololearn.com/cxY77z1323FT/?ref=app
+ 8
Here's my attempt, hope it meets the requirements : )
https://code.sololearn.com/cAyYs1995Uz4/?ref=app
+ 7
my try
plz report if bugs
https://code.sololearn.com/cbqG15biI09h/?ref=app
+ 6
+ 5
+ 4
@jonathan you didn't understand the task. you should search words* in words** in given string. both are wodrs* and words** must be inside given string.
+ 4
I have reached lvl 9 with your upvotes. Thank you! All answers are the best.
+ 3
@VcC you're right! Sorry, I didn't see
+ 3
@Jonathan Pizarra, is my challenge hard? Need I make it easier?
+ 3
just add "set" and you dont tell when a word is contained twice. see here
https://code.sololearn.com/cLo90D3qZ461/?ref=app
+ 2
the also appears twice in the first example
+ 2
@HeisAbdulaziz so simple... cool, tnx for challenge
+ 2
сам напиши
+ 2
This is my try that make exactly what the challenge ask, with only one line in output when found multiple values. (I consider wrong all the other codes with multiple line of output for the same word)
https://code.sololearn.com/cJzpcyzOQggP/#py
+ 1
Shorter oneliner
https://code.sololearn.com/cLo90D3qZ461/?ref=app