get hald of a list python code example
Example: how to take first half of list python
Use the slicing syntax list[:middle_index] to get the first half of the list
and list[middle_index:] to get the second half of the list.
Use the slicing syntax list[:middle_index] to get the first half of the list
and list[middle_index:] to get the second half of the list.