On Fri, Feb 20, 2015 at 3:47 PM, Chris Stinemetz
wrote:
>
> I understand what you are explaining to me but I am not sure why every
> instance of the key 8:value changes when I assign a new value to it.
Ah. Be wary of structure sharing when the values being shared are mutable.
A textbook examp
On Fri, Feb 20, 2015 at 4:51 PM, Mark Lawrence
wrote:
> On 20/02/2015 17:56, Chris Stinemetz wrote:
>
> Please don't top post as it makes long threads difficult if not impossible
> to follow, thanks.
>
> I am getting closer. I think I have figured out the logic. I just have a
>> quick question.
On 20/02/2015 17:56, Chris Stinemetz wrote:
Please don't top post as it makes long threads difficult if not
impossible to follow, thanks.
I am getting closer. I think I have figured out the logic. I just have a
quick question. How do you access key:values in a nested dictionary?
MOL02997_C':
On 20/02/15 17:56, Chris Stinemetz wrote:
I am getting closer. I think I have figured out the logic. I just have a
quick question. How do you access key:values in a nested dictionary?
MOL02997_C': [{'2': '0', '7': '0', '8': '0', '9': '0'}]}
say I want to access the key:value 8:0
print dict['MO
I am getting closer. I think I have figured out the logic. I just have a
quick question. How do you access key:values in a nested dictionary?
MOL02997_C': [{'2': '0', '7': '0', '8': '0', '9': '0'}]}
say I want to access the key:value 8:0
print dict['MOL02997_C']['8'] doesn't seem to work.
Thank
Chris Stinemetz wrote:
> Here is a sample of the input data, it is tab delimited and I chopped it
> down for example purposes:
>
>
> KSL03502_7A_1 11.5921
> KSL03502_7B_1 46.4997
> KSL03502_7C_1 13.5839
> KSL03505_7A_1 12.8684
> KSL03505_7B_1 16.5311
> KSL03505_7C_1 18.9926
> KSL03509_7A_1 3.
On 20/02/2015 00:55, Chris Stinemetz wrote:
Other than the minor tweaks I've suggested I'm not sure what your problem
is? I think we need to see the data to understand the issue.
Here is a sample of the input data, it is tab delimited and I chopped it
down for example purposes:
KSL03
>
>
>
>
> Other than the minor tweaks I've suggested I'm not sure what your problem
> is? I think we need to see the data to understand the issue.
Here is a sample of the input data, it is tab delimited and I chopped it
down for example purposes:
KSL03502_7A_1 11.5921
KSL03502_7B_1 46.4997
K
On 2/19/2015 3:10 PM, Alan Gauld wrote:
On 19/02/15 22:50, Emile van Sebille wrote:
if cell.endswith(suffix, 14, 16) is False:
... so they'll never end with numeric values. Further, "".endswith()
accepts only one argument so you ought to get an error on this line.
Sorry Emile, The OP
On 19/02/15 22:50, Emile van Sebille wrote:
if cell.endswith(suffix, 14, 16) is False:
... so they'll never end with numeric values. Further, "".endswith()
accepts only one argument so you ought to get an error on this line.
Sorry Emile, The OP is correct.
##
>>> h
On 19/02/15 21:19, Chris Stinemetz wrote:
The dictionary format looks like:
format = {'Cell': '','7':'','8':'','9':'','2':''}
For each line read in I would simply like to check to see if a Cell
key;value exists and if it does update the correct key==band(7,8,9,2)
within the dictionary.
If the
On 2/19/2015 1:19 PM, Chris Stinemetz wrote:
Hello List,
I have a dictionary that I would like to update/add rows to it as I read a
file line by line.
The dictionary format looks like:
format = {'Cell': '','7':'','8':'','9':'','2':''}
For each line read in I would simply like to check to see
Hello List,
I have a dictionary that I would like to update/add rows to it as I read a
file line by line.
The dictionary format looks like:
format = {'Cell': '','7':'','8':'','9':'','2':''}
For each line read in I would simply like to check to see if a Cell
key;value exists and if it does updat
13 matches
Mail list logo