Python List.peek
def peek_list(list):
if list:
return list[-1] # get last element of list
else:
return None
Wissam
def peek_list(list):
if list:
return list[-1] # get last element of list
else:
return None