Question #256507

33. Write a program, how to check if the input is in the given list or not ..?

  


Expert's answer

Let a is the input value, then the program looks like this:

if type(a) is list:
  print("Type of a is a list.")
else:
  print("Type of a isn't a list!")
LATEST TUTORIALS
APPROVED BY CLIENTS