can't you just put as much spaces as you need and then place the string ?
to put a string after 272 spaces (your example) you just need to do "
".join(range(272)) + 'AAAAA'
On Friday, October 5, 2012 6:57:27 PM UTC+2, praveen krishna wrote:
>
> No,But Now I have tried it now its generating good spacing but the main
> problem is how to align it at particular position "[(272, 277, 'AAAAA') "
> of the string.I have tried with string method '{:>30}'.format('right
> aligned') but it is not possible to put the string position .Is there any
> syntax in html to align at particular position.
>
> On Fri, Oct 5, 2012 at 6:14 PM, Niphlod <[email protected] <javascript:>>wrote:
>
>> did you ever considered using <pre> to print this ?
>> Your visualization is probably falling apart because all the letters
>> don't "occupy" the same amount of space horizontally (and because multiple
>> spaces in html are stripped if not contained in a <pre>, and because a
>> single space varies with the font used )
>> You can turn the font of those lines to something like Lucida Console
>> (those fonts you need are called "monospaced" because every letter takes
>> exactly the same amount of space horizontally)
>>
>> The same difference (hoping that you're reading from the google groups
>> interface than the emails) can be "simulated" here. 1st line without
>> spaces, 2nd line starts with 2 spaces, 3rd line starts with 4 spaces
>>
>> TAGCGCTTTAAACCCCCC
>> ACTAGTTAGERT
>> ACTATTAGTAAACCC
>>
>> as you can see, they are not aligned at all. However, if you wrap them in
>> a <pre>, then you can visualize it "correctly aligned", as the below example
>>
>> TAGCGCTTTAAACCCCCC
>> ACTAGTTAGERT
>> ACTATTAGTAAACCC
>>
>>
>> On Friday, October 5, 2012 5:19:48 PM UTC+2, praveen krishna wrote:
>>>
>>> Hi,
>>> I want to align two strings one has a long sequence and other is of
>>> type list which a has sub-strings all of same type and the starting and
>>> ending positions corresponding to first string .I have tried with html tags
>>> 'LI' and 'TR' but its not working can you suggest me better approach.
>>> example :
>>> string1 : **GCGCAACGCAATTAATGTGAGTTACCTCAC**
>>> TCATTAGGCACCCCAGGCTTTACACTTTAT**GCTTCCGGCTCCTATGTTGTGTGGAATTGT**
>>> GAGCGGATAACAATTTCACACAGGAAACAG**CTATGACCATGATTACGCCAAGCTCGGAAT**
>>> TAACCCTCACTAAAGGGAACAAAAGCTGGT**ACCGTCGAGGGATCCTCGTTACTCAATAAG**
>>> TATTAATTGTTCGATGCTGTTAGTAATGTT**CCTAACAGGGAAAGTTTCCGGCGAACAGGT**
>>> CTAAAAAAAGAAACAAAAAAAAAAAGAAGT**ACTCCGTATCACCGTGCGTTATTTTTAAAA**
>>> ATACGGAGTTAGTGTCTCAATCAAAAATGT**AAAGCCGCCTCCTCTCTAGTTTAGCTGTGG**
>>> AAGATTTCTTGTCATCGAATATACATCATA**TGTAACAATTCTTTTTCTCAATGTTTATGC**
>>> GTGACCCAAACATAATCTCTATCATTACCT**CAATTTTGTAAACAAAATGAACATACCTTA**
>>> AAGTTGAATTAGCCACCTCGTCACATCACA**TCGAATCGGAACTAGAAT
>>> sub bstring :
>>> [(272, 277, 'AAAAA'), (284, 289, 'AAAAA'), (289, 294, 'AAAAA'), (326,
>>> 331, 'AAAAA'), (352, 357, 'AAAAA')
>>> I want to align this sub string at the position starting from 252 to
>>> 260. what is will be the better approach.
>>>
>> --
>>
>>
>>
>>
>
>
--