Skip to content

Instantly share code, notes, and snippets.

@soh-i
Created October 2, 2015 07:29
Show Gist options
  • Select an option

  • Save soh-i/c6c45787c251dc235b7e to your computer and use it in GitHub Desktop.

Select an option

Save soh-i/c6c45787c251dc235b7e to your computer and use it in GitHub Desktop.
Generate random sequence
import random
n_code = {0: "A", 1: "T", 2: "C", 3: "G"}
print "".join(map(lambda _: n_code[random.randint(0, 3)], range(0, 20)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment