for seqA in poolA:
print seqA + ":",
for i in seqA:
print complements[i],
print
complements is a dict and poolA is a list.
When I print complements[i] there are spaces in between, how do I remove these spaces?
for seqA in poolA:
print seqA + ":",
for i in seqA:
print complements[i],
print
complements is a dict and poolA is a list.
When I print complements[i] there are spaces in between, how do I remove these spaces?
Join the items and print the resulting string.
print ''.join(str(complements[i]) for i in seqA)
Well, just don't print them out. Use either from __future__ import print_function and then print(complements[i], end = ''), or sys.stdout.write(complements[i]).