I am trying to solve a bioinformatics question. Basically, the user inputs a integer and I output all the possible permutations of A, C, G, T that are length of the imputed integer. The integer can be greater 4. For example:
If the user inputs 2, I will output:
['AA', 'AC', 'AG', 'AT', 'CA', 'CC', 'CG', 'CT', 'GA', 'GC', 'GG', 'GT']
If the user inputs 5, I will output:
['AAAAA', 'AAAAC', 'AAAAG', 'AAAAT', 'AAACA'.....'TTTGT', 'TTTTA', 'TTTTG', 'TTTTT']
Do you know how to make a function for this in python 2.7?