Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. S = input()
  2. A = S.split(' ')
  3. newS = []
  4. for i in range(len(A)):
  5.     if i % 3 != 0:
  6.         newS.append(A[i])
  7.  
  8.  
  9.  
  10.  
  11. H = input()
  12. A = H.split(' ')
  13. newH = []
  14. for i in range(len(A)):
  15.     if i % 3 != 0:
  16.         newH.append(A[i])
  17.  
  18.  
  19.  
  20. xfinal = []
  21. yfinal = []
  22. for e in newS:
  23.     if e in newH and e.isdigit() == False:
  24.          xfinal.append(newS[newS.index(e)+1])
  25.          yfinal.append(newH[newH.index(e)+1])
  26. print (xfinal)
  27. print (yfinal)
  28.  
  29. import matplotlib.pyplot as plt
  30. fig, ax = plt.subplots()
  31. ax.bar(xfinal, yfinal, label="")
  32. ax.legend()
  33. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement