HOME/Articles/

python code find element (snippet)

Article Outline

Python example 'python code find element'

Functions in program:

  • def head(list):

python code find element

Python code example: python code find element

#Find the first element of a list

def head(list):
    return list[0]
print(head([1, 2, 3, 4, 5]))

More Python: https://pythonprogramminglanguage.com