def borrowers_input(b):
x=input()
while x!='Checkouts':
x=x.split('~')
b.append(x)
x=input()
def checkouts_input(c):
x=input()
while x!='EndOfInput':
x=x.split('~')
c.append(x)
x=input()
def output():
global books,borrower,checkout
date=[]
uname=[]
name=[]
Anum=[]
title=[]
for i in range(0,len(checkout)):
date.append(checkout[i][2])
for i in range(0,len(checkout)):
uname.append(checkout[i][0])
for i in range(0,len(uname)):
for j in range(0,len(borrower)):
if(uname[i] == borrower[j][0]):
name.append(borrower[j][1])
for i in range(0,len(checkout)):
Anum.append(checkout[i][1])
for i in range(0,len(Anum)):
for j in range(0,len(books)):
if(Anum[i] == books[j][0]):
title.append(books[j][1])
final=[]
for i in range(0,len(checkout)):
final.append(date[i]+'~'+name[i]+'~'+Anum[i]+'~'+title[i])
final.sort()
for i in range(0,len(final)):
print(final[i])
books=[]
borrower=[]
checkout=[]
x=input()
x=input()
while x!='Borrowers':
x=x.split('~')
books.append(x)
x=input()
borrowers_input(borrower)
borrower.sort()
checkouts_input(checkout)
output()
***********************
pastebin url:
https://pastebin.com/9vdcgpZ6
On this page of the site you can watch the video online WEEK-5 PDSA PYTHON NPTEL PROGRAMMING ASSIGNMENT 2020 with a duration of hours minute second in good quality, which was uploaded by the user Glad you seen 24 February 2020, share the link with friends and acquaintances, this video has already been watched 458 times on youtube and it was liked by 9 viewers. Enjoy your viewing!