Computer Science, asked by ishayan40, 11 months ago

store 20 names in a single dimension array . accept a name check and print whether it is present in a array or not .​

Answers

Answered by sarita1974lko
1

n= [ 'Rishi', 'Nidhi', 'Rony', 'Harry', 'Nishchay', 'Carry', 'Shlok', 'Abhudaya', 'Gaurav', 'Sanchit', 'MortaL', 'VipeR', .... ]

e= input('enter a name : ')

if e in n:

print(f'{e} is present in the list')

else:

print(f'{e} is not in the list')

Similar questions