Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. locations = ["austx", "chntx", "santx"]
  2.  
  3. austx = ["aus.1", "aus.2", "aus.3"]
  4.  
  5. chntx = ["chn.1", "chn.2", "chn.3"]
  6.  
  7. santx = ["sat.1", "sat.2", "sat.3"]
  8.  
  9. for i in zip(locations, [austx, chntx, santx]):
  10. print(i)
  11.  
  12. ('austx', ['aus.1', 'aus.2', 'aus.3'])
  13. ('chntx', ['chn.1', 'chn.2', 'chn.3'])
  14. ('santx', ['sat.1', 'sat.2', 'sat.3'])
  15.  
  16. locations = [["aus.1", "aus.2", "aus.3"],
  17. ["chn.1", "chn.2", "chn.3"],
  18. ["sat.1", "sat.2", "sat.3"]]
  19.  
  20. for i in locations:
  21. for val in i:
  22. print(val)
  23.  
  24. locations = ["austx", "chntx", "santx"]
  25. lists = {"austx": ["aus.1", "aus.2", "aus.3"],
  26. "chntx": ["chn.1", "chn.2", "chn.3"],
  27. "santx": ["sat.1", "sat.2", "sat.3"]}
  28.  
  29. for i in locations:
  30. lst = lists[i]
  31. for val in lst:
  32. print(val)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement