Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. def match(questionType):
  2. total = []
  3. q = '{}.txt'.format(questionType)
  4. answer = 'answer{}.txt'.format(questionType)
  5. with open(q,'r') as fque:
  6. with open(answer,'r') as fans:
  7. questions = fque.readlines()
  8. answer = fans.readlines()
  9. result = []
  10. count = 0
  11. countans = 0
  12.  
  13. while True:
  14. if count == len(questions):
  15. result.append(questions[count])
  16. result.append(answer[count])
  17. count += 1
  18. countans +=1
  19. total.append(result)
  20. elif answer = '\n':
  21. count +=2
  22. countans += 2
  23. else:
  24. break
  25. return total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement