Dear all,
Pardon me for asking a simple question. Sometimes
brain gets blank and compells me to seek help from
tutors.
I have a list :
>>>prcor
['933\t957', '955\t979', '969\t993', '1025\t1049',
'1052\t1076', '1098\t1122', '1136\t1160',
'1298\t1322', '1406\t1430', '1422\t1446',
'1471\t1495']
>>> prc = ()
>>>for line in prcor:
cols = line.split('\t')
(x,y) = (int(cols[0]),int(cols[1]))
prc = (x,y)
>>>prc
(1471, 1495)
Because the resulting element is a tuple, append is
not working.
How can I push all these elements in this list:
['933\t957', '955\t979', '969\t993', '1025\t1049',
'1052\t1076', '1098\t1122', '1136\t1160',
'1298\t1322', '1406\t1430', '1422\t1446',
'1471\t1495']
into a a big tuple :
((933,957),(955,979),(969,993),(1025,1049),(1052,1076),(1098,1122),(1136,1160),
(1298,1322),(1406,1430),(1422,1446),(1471,1495))
Thank you.
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor