Advertisement
biswasrohit20

presi

Mar 22nd, 2021
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. state = input("Enter the state abbreviation: ")
  2. with open("jd.txt") as file_in:
  3. print("{:<20} {:<20} {:<15}".format("Justice", "Appointing Pres", "Yrs Served"))
  4. for line in file_in:
  5. if(line.split(",")[3] == state):
  6. line = line.split(",")
  7. 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