Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python string is in list

# Gives True/False if a string is in a list.
input = 'hello'
result = input in ['greetings', 'and', 'hello', 'sir']
print(result)
Source by utilities.tk #
 
PREVIOUS NEXT
Tagged: #python #string #list
ADD COMMENT
Topic
Name
5+5 =