SHARE
TWEET

Untitled

a guest Jul 17th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python3
  2. import csv
  3.  
  4. x = '7.csv'
  5.  
  6. vvod = input("Model is: ")
  7. with open ( x , 'r' , newline = '' ) as f:
  8.         file = csv.reader(f)
  9.         for row in file:
  10.             if vvod == "Porsche 911":
  11.                 print ( row[0])
  12.             elif vvod == "Porsher 918":
  13.                 print (row[1])
  14.             elif vvod == "Porsche 906":
  15.                 print (row[2])
  16.             else:
  17.                 print("UNCORRECT")
  18. # input_sorted = input("Yes/No?: ")
  19. # if input_sorted == "Yes":
  20. #     sortedlist = sorted(x, key=lambda row: (row[1],row[0],row[2]), reverse=True)
  21. # else:
  22. #     print (" okey...")
  23. # def aaa():
  24. #     with open ( x , 'r' , newline = '' ) as f:
  25. #         file = csv.reader(f)
  26. #         for row in file:
  27. #             print ( row[0])
  28. #             return (row[0])
  29. # def bbb():
  30. #     with open ( x , 'r' , newline = '' ) as f:
  31. #         file = csv.reader(f)
  32. #         for row in file:
  33. #             print ( row[1])
  34. #             return (row[1])
  35. # def ccc():
  36. #     with open ( x , 'r' , newline = '' ) as f:
  37. #         file = csv.reader(f)
  38. #         for row in file:
  39. #             print ( row[2])
  40. #   ..          return ( row [2])
RAW Paste Data
Top