0

Help me with code please

Can I test if the input contains a specific character in py?

19th Jan 2020, 12:12 PM
Tovi Ng
Tovi Ng - avatar
1 Respuesta
+ 1
Yeah, by using 'in'. inp = input() if 'q' in inp: print('You used a rare letter there!)
19th Jan 2020, 12:39 PM
HonFu
HonFu - avatar