Percentage of match between two sequences is possible not what you want, you are very likely interested in percentage of macht between two aligned sequences. That opens the question how to align your sequences (which algorithm to use). And consider this case:
seq_1 : ATGGATCATTGA
Is seq_2 100% identical to seq_1? Would you say the same the other way round?
However, here is an example that shows how you may use Biopython to address your problem (of course you need to have Python and Biopython installed):
from __future__ import print_function
from Bio import pairwise2 as pw2
first_seq = 'ATGGATCATTGA'
second_seq = 'CATTGA'
global_align = pw2.align.globalxx(first_seq, second_seq)
The output is:
('ATGGATCATTGA', '------CATTGA', 6.0, 0, 12)
pw2.align2.globalxx makes an optimal global alignment between your two sequences, where every match counts 1 point , while mismatches and insertions/deletions cost nothing.
print(global_align) returns the first alignment (there may be several different alignments with the same score). The third list element (the first number) is the number of matching residues, the other two numbers are the beginning and the end of the alignment. So the alignment has a length of 12 (which, in this case, is also the length of the longer sequences, but usually the alignment will be longer than each of the two sequences), there are 6 matching residues, the shorter sequence has a length of 6. So you may calculate the percentage as follows:
seq_length = min(len(first_seq), len(second_seq))
matches = global_align
percent_match = (matches / seq_length) * 100