Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. e_rows = (10,34)
  2. e_col = (4,6,8,10,13,15,17,19)
  3. inst = 'A'
  4.  
  5. test_list = [inst+'_r'+str(e_rows[0])+'c'+str(i) for i in range(4,12,2)]
  6. test_list.extend([inst+'_r'+str(e_rows[0])+'c'+str(i) for i in range(13,21,2)])
  7. test_list.extend([inst+'_r'+str(e_rows[1])+'c'+str(i) for i in range(4,12,2)])
  8. test_list.extend([inst+'_r'+str(e_rows[1])+'c'+str(i) for i in range(13,21,2)])
  9.  
  10. print(test_list)
  11.  
  12. ['A_r10c4', 'A_r10c6', 'A_r10c8', 'A_r10c10', 'A_r10c13', 'A_r10c15', 'A_r10c17', 'A_r10c19', 'A_r34c4', 'A_r34c6', 'A_r34c8', 'A_r34c10', 'A_r34c13', 'A_r34c15', 'A_r34c17', 'A_r34c19']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement