How would I go about sorting a list within this dictionary class without using sort()?

I want to sort it by date 20210825 using a sorting algorithm and not by using sort().

I also realize that it is already technically sorted on input, but want it to sort if that wasn't the case.

This is my code for the class so far:

class SLDict():


    def __init__(self):
        self.__dict_list = []

    def search_day(self, day): #search function for finding date info
        #self._dict_list = []
        for date in self.__dict_list:
            if date.get_day() == day:   ##if day matches, return true
                return date

        return None

    def create_list(self, datafile):

        #lis = []
        with open(datafile, "r") as file:   # loop through each line
            for line in file:  # For each line, create object and add to dictionary
                line = line.strip()
                num = line.split()

                print(num)

                day = Date()
                day.set_day(int(num[0]))                #
                day.set_maxTemp(num[1])
                day.set_minTemp(num[2])            #
                day.set_avgTemp(num[3])          # stores datapoint into array
                day.set_precip(num[4])           #
                day.set_wind(num[5])             #
                day.set_humid(num[6])

                   
                self.__dict_list.append(day)
                #print(day.get_day())


def main():     #main for testing

    list = SLDict()
    list.create_list("datafile.txt")   
    day = 20210825
    date = list.search_day(day)

    if date == None:    #checks if valid date is searched
        print("date not found")

    else:    #if valid, prints date info
        print("Date info: " + str(date.get_day()) + ", " + str(date.get_maxTemp()) + ", " + str(date.get_minTemp()) + ", " + str(date.get_avgTemp()) + ", " + str(date.get_precip()) + ", " + str(date.get_wind()) + ", " + str(date.get_humid()))

if __name__ == "__main__":
    main()

Here is the output:

['20210825', '91', '74', '82.5', '0.12', '11.8', '71.4']
['20210826', '90', '74', '82', '0.2', '10.3', '78.6']
['20210827', '91', '78', '84.5', '0.01', '13.1', '73.1']
['20210828', '91', '84', '87.5', '0', '13.9', '73.1']
['20210829', '91', '81', '86', '0.02', '8.8', '73.7']
['20210830', '90', '77', '83.5', '0.43', '4.5', '76.7']
['20210831', '94', '74', '84.5', '0.99', '3.8', '78.9']
['20210901', '96', '77', '86.5', '0.01', '4.8', '69.2']
['20210902', '90', '74', '82', '0.44', '5.8', '83.2']
['20210903', '86', '75', '80.5', '1.07', '3.9', '87.6']
['20210904', '92', '74', '83', '1.22', '4.4', '85.6']
['20210905', '94', '76', '85', '0.28', '3.3', '83.9']

Date info: 20210825, 91, 74, 82.5, 0.12, 11.8, 71.4

[Finished in 0.085s]
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum