Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state = input("Enter the state abbreviation: ")
- with open("jd.txt") as file_in:
- print("{:<20} {:<20} {:<15}".format("Justice", "Appointing Pres", "Yrs Served"))
- for line in file_in:
- if(line.split(",")[3] == state):
- line = line.split(",")
- print("{:<20} {:<20} {:<15}".format(line[0] + " " + line[1],line[2],int(line[5])-int(line[4])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement