Skip to content

Instantly share code, notes, and snippets.

@Robofied
Created February 5, 2019 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robofied/21c909b316c9d12f6b9d43043b872cce to your computer and use it in GitHub Desktop.
Save Robofied/21c909b316c9d12f6b9d43043b872cce to your computer and use it in GitHub Desktop.
## len() method
## Checking previously defined l3.
print(len(l3))
#[Output]:
3
## in operator
if 'a' in l3:
print('Yes, this element is in the list')
#[Output]:
#Yes, this element is in the list
## in operator for iterating over elements
for e in l3:
print(e)
#[Output]:
#a
#1
#hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment