-
-
Save Redwoodce/dd0661fdd5f7d85b091fb6bafc03f41a to your computer and use it in GitHub Desktop.
Below, we’ve provided a list of lists. Use in statements to create variables with Boolean values - see the ActiveCode window for further directions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L = [[5, 8, 7], ['hello', 'hi', 'hola'], [6.6, 1.54, 3.99], ['small', 'large']] | |
# Test if 'hola' is in the list L. Save to variable name test1 | |
test1 = ('hola' in L) | |
# Test if [5, 8, 7] is in the list L. Save to variable name test2 | |
test2 = ([5, 8, 7] in L) | |
# Test if 6.6 is in the third element of list L. Save to variable name test3 | |
test3 = (6.6 in L[2]) | |
test3 = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment