Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check python to see if list length is even

def check_length(lst):
  if len(lst) % 2 == 0:
    return "The list length is even."
  else:
    return "The list length is odd."
 
PREVIOUS NEXT
Tagged: #check #python #list #length
ADD COMMENT
Topic
Name
6+8 =