Jan-10-2020, 06:45 PM
Something like
from operator import itemgetter your_list = ... # list of 1-D lists your_list.sort(key=itemgetter(0))That said, as ndc85430 said, your posts should generally show your attempt.