Skip to content

Chapter 6 solution 1: two questions #1

@singing-scientist

Description

@singing-scientist

Dear Ken: from one Perl hack to his better, I cannot thank you enough for this book!

I have two likely trivial questions:

  1. At the bottom of p. 142, I had initially tried the following:

distance += 1 if seq1[i] != seq2[i]

However, this fails. Would you be willing to help help me understand why this does not work in Python?

  1. On p. 142-143, you copy the two sequences into variables rather than using them directly as args.seq1 and args.seq2. Is there a computational or other advantage to doing this? I ask because I am always afraid of making multiple copies of sequences in case they're too long.

Very grateful for this book, and for your help!
Chase

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions