Guest User

Untitled

a guest
Jul 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. 1. you may take itemA
  2. 2. for every 3 models, you may exchange itemB with itemC
  3. 3. each model may take 2 of itemD
  4. 4. each model may take one of either itemE, itemF or itemG
  5.  
  6. for index, option in enumerate(self.options):
  7. output = "{}.".format(index+1)
  8. if '-' in option:
  9. sub_option, no_models = option.split('-')
  10. no_models = int(no_models)
  11. print(sub_option)
  12. print(no_models)
  13. output += "For every {} models ".format(no_models)
  14. if '/' in sub_option:
  15. temp_str, temp_options, points_list = exchange_option(sub_option)
  16.  
  17. else:
  18. temp_str, temp_options, points_list = standard_option(sub_option)
  19.  
  20. index_points.append(points_list)
  21. temp_options.append(no_models)
  22. index_options.append(temp_options)
  23.  
  24. else:
  25. if '/' in option:
  26. temp_str, temp_options, points_list = exchange_option(option)
  27. else:
  28. temp_str, temp_options, points_list = standard_option(option)
  29.  
  30. index_points.append(points_list)
  31. index_options.append(temp_options)
  32.  
  33. output += temp_str
Add Comment
Please, Sign In to add comment