In pyhton i want to code something like this( if this word is mentioned print this)..but i dont know how...help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

In pyhton i want to code something like this( if this word is mentioned print this)..but i dont know how...help

print

24th Feb 2017, 11:00 AM
Shakil Masood
Shakil Masood - avatar
4 Answers
+ 1
but i want to pri t "this" whenever the "word" is mentioned
24th Feb 2017, 11:49 AM
Shakil Masood
Shakil Masood - avatar
+ 1
like if i writ3 this then the word comes up
24th Feb 2017, 11:50 AM
Shakil Masood
Shakil Masood - avatar
+ 1
input: string="Hello world" if Hello in string: print ( 'yes') if Hi in string: print ( ' Hi is in string') output: yes
22nd Jun 2018, 12:50 PM
Sahil Danayak
Sahil Danayak - avatar
0
just a variable? word="this" print(word)
24th Feb 2017, 11:46 AM
LordHill
LordHill - avatar