Hello everyone, I have two files i.e Rules.txt and Members.txt. I have set different rules for different members. Now i have break down the rules comma seperately using the for loop. I want to compare each index of the 1st file with the respective index of the second file. If it matches so it should do something and vice versa. Please let me know how can i compare them? I am new to python. Thanks in advance.
def compare():
file1=open("D:\Rules.txt")
for rules in file1:
print rules.split(',')
membersFile=open("D:\Members.txt")
for members in membersFile:
print members.split(',')
compare()