Is there any way to make the following if statement more elegant without the need to repeat the "and" conditional ? Sorry I m a newbie.
a = ' 10 20 30 40 50 '
print(a)
if '10' and '20' and '30' and '40' and '50' not in a :
print('something is wrong')
else:
print('This is correct')
Thanks
Aucun commentaire:
Enregistrer un commentaire