FunctionalX.py
stable
  • lists
    • cart2()
    • cartn()
    • cart_append()
    • dict2list()
    • head()
    • tail()
  • FunctionalX
FunctionalX.py
  • Docs »
  • lists »
  • head()
  • Edit on GitHub

head()¶

FunctionalX.src.lists._head.head(list1: list) → object¶

Return the head of a list.

If the input list is empty, then return None.

Parameters:list1 (list) – input list
Returns:the first item
Return type:object
>>> head([])
None
>>> head([1,2,3])
1
Next Previous

© Copyright 2016, Yuhang(Steven) Wang. Revision 712d3826.

Built with Sphinx using a theme provided by Read the Docs.