>nmr = nmrows[i]
> pbr = cols[0]
> print nmrow[i] +'\t'+cols[0]
nmr = str(nmrows[i])
pbr = cols[0]
print nmrow[i]+'\t'+cols[0]
will print what you want.
k
--- Srinivas Iyyer <[EMAIL PROTECTED]> wrote:
> Hello group,
> I am trying to print rows from two lists together:
>
> how can i deal with TypeError' where i have to print
> a
> list and a string.
>
> for line in pb: # tab delim text with 12 columns
> cols = line.split('\t')
> temp_seq = cols[7].split('\n') # extract 7thcol
> seq = temp_seq[0].split(',') #splitting it by ,
> for nm in seq:
> for i in range(len(nmrows)):
> if nm == nmrows[i][0] and nmrows[i][3] < cols[4]
> and nmrows[i][4] > cols[5]:
> nmr = nmrows[i]
> pbr = cols[0]
> print nmrow[i] +'\t'+cols[0]
>
>
>
> I tried the following also :
>
> I created an empty list outside for loop and tried
> to
> extend the elements of the list and string
>
> nmr = nmrows[i]
> pbr = cols[0]
> result.extend(nmr+'\t'+pbr)
>
> # result is the list i created. nmr is a list, and
> pbr
> is a string.
>
> can any one plaease help.
>
> thanks
> Srini
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - Get yours free!
> http://my.yahoo.com
>
>
> _______________________________________________
> Tutor maillist - [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor