I am trying to match someone with another person in a Google Form survey we did. I took the results and put it in a csv file. I just can't figure out how exactly I would be able to do this. (For example, one person could respond [10, 5, 6, 2, 7] and another could respond [5, 7, 1, 5, 6])
import csv
import random
with open('PhilosophyResponses.csv') as f:
reader = csv.reader(f)
chosen_row = random.choice(list(reader))
print(chosen_row)
The code above does what I want it to do. It selects a random person from the file and prints me their information, but I can't figure out how I would do the rest.
With the random module, would I be able to select someone from the list that would have a similar response?
Aucun commentaire:
Enregistrer un commentaire