Hello Kirk,<br><br>If I'm not mistaken your idea is referencing two columns: first column is your acid name and the later is your surface area.<br>Later you want to connect the surface area if you name the acid name.<br>If that what you want another question arises... is your acid name is unique.
<br>If it is you can make dictionary types.<br><br>A csb<br>B dsk<br>C dsk<br><br>you can create <br>mydic = []<br>mydic['A'] = 'csb'<br>mydic['B'] = 'dsk'<br>mydic['C'] = 'dsk'<br><br>you have to transform the file into a list and after that start building the dictionary variable.
<br><br>After this dictionary variable is filled. you can get the surface area by typing the acid name such as:<br>print mydic['A'] # will result 'csb'<br><br>Cheers,<br>pujo<br><br><div><span class="gmail_quote">On 1/17/06,
<b class="gmail_sendername">Kirk Vander Meulen</b> <<a href="mailto:kvander11@gmail.com">kvander11@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, just joined. I've got a question that I'm guessing there's a
ridiculously easy answer to, but I'm having trouble (no excuses, I'm
just dumb!)...<br>
<br>
My problem is I want to make a string object into a reference to
another object. To be more specific, I'm reading through a text
file of amino acids. The first item on each line is the amino
acid name, and a later item is its exposed surface area. For each
amino acid, I want to add up the surface area as I go through the text
file. So what I'm doing is, for each line, assigning the
reference 'residue' to the amino acid name. I'd like to then make
the string referred to by 'residue' (eg, 'CYS' or 'TRP') a reference to
an object that I will subsquently increment by the surface area value.<br>
<br>
Thanks for any help. Perhaps I just need to be pointed to a
relevent thread or given the correct words to search for in the
archives or manual.<br><span class="sg">
<br>
Kirk<br>
</span><br>_______________________________________________<br>Tutor maillist - <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Tutor@python.org">Tutor@python.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">
http://mail.python.org/mailman/listinfo/tutor</a><br><br><br></blockquote></div><br>