Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python program to check whether a specified value is contained in a group of values

give = int(input('Enter a value'))
earch = input('Enter a number to check if its in the value of numbers')
g = 0
search = earch.split()
for i in range(0,len(search)):
  if give == int(search[i]):
    g = 1
    break;
      
if g == 1:
  print('True')
else:
  print('False')
 
PREVIOUS NEXT
Tagged: #python #program #check #contained #group #values
ADD COMMENT
Topic
Name
1+8 =