I am trying to print some text. But the result returned is not what is needed. In fact the whole "if statement" is getting cancelled. With only one part of the 'or' statement , I get the intended result but when 'or' is used , it's not working . Neither is it working with 'elif'. Can someone tell me what is happening ? Result needed : Print "Send!!!" while '!' or '.' comes in code. Result getting : Just the 'for statement working'. The value of 'i' is just a word(some with '.' and '!')
for i in range(0, 20):
line = orginal.readline()
dot_check = '.' in line
excl_check = '!' in line
if (dot_check == False) or (excl_check == False):
print(line)
else :
print('Send!!!')
Thank You !!!
Aucun commentaire:
Enregistrer un commentaire