In operator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

In operator

How to use in operator with input() text?

2nd Oct 2021, 6:21 PM
Renat Salyukov
Renat Salyukov - avatar
4 Answers
+ 5
Renat Salyukov , your question seems not to be complete. please give some more information about: - programming language you wanted to use - the specific case you wanted to implement the in operator - input data and output samples - if it is related to a sololearn tutorial, please name it and also give us the exercise / lesson number. thanks!
2nd Oct 2021, 6:56 PM
Lothar
Lothar - avatar
+ 3
The same way as with every other text.
2nd Oct 2021, 6:25 PM
Simon Sauter
Simon Sauter - avatar
2nd Oct 2021, 6:24 PM
Simon Sauter
Simon Sauter - avatar
+ 2
In Python,you could do something like this txt= input() if "why" in txt: print("Why not") else: print(txt)
2nd Oct 2021, 9:08 PM
Rik Wittkopp
Rik Wittkopp - avatar