HOW DO I SORT THIS BY BIRTHYEAR IN ASCENDING ORDER? I'm distance learning student and have no help. I have a .txt file with this form: I'm trying to get that .txt in a list and sort it by birth year.
Brett Finch, 1839 Third, 1992
David Edwards, 290 Locust, 1985
Mia Palm, 33 Birch, 1980
I pieced this from multiple sources and it's only getting worse! Any help is greatly appreciated!!!
lstneedssorted = []
f3 = open("file3.txt")
print("\nMerged Doctors Data: ")
Count = 0
for lx in f3:
print(lx.rstrip())
lx = lx.strip().split(",")
#strVal = lx
lstneedssorted.sort([lx[0], lx[1], lx[2]])
print(lstneedssorted)
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)