DEV Community

Steve Tomi
Steve Tomi

Posted on

1

I am stuck

text = input()
word = input()
print (word)
words = word.split()
print (text)
print (words)
if text in words:
print("Word found")
else:
print("Word not found")

I can't find what I am doing wrong on this code
It doesn't print Word found, so I debugged using the print statement to see what the variable "words" print, at first, it works fine, then it doesn't. Please assist me

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay