I've been working on a program and have had to halt it due a slight problem.
Here's a basic version of the code:
a = 'filled'
b = 'filled'
c = 'empty'
d = 'empty'
e = 'filled'
f = 'empty'
g = 'filled'
testdict = {a : 'apple' , b : 'banana' , c : 'cake' , d : 'damson' , e : 'eggs'
, f : 'fish'
On Saturday, October 12, 2013 10:56:27 AM UTC+2, reuben...@gmail.com wrote:
I've been working on a program and have had to halt it due a slight problem.
Here's a basic version of the code:
a = 'filled'
b = 'filled'
c = 'empty'
d = 'empty'
e = 'filled'
f = 'empty'
g =
reubennott...@gmail.com wrote:
I've been working on a program and have had to halt it due a slight
problem. Here's a basic version of the code:
a = 'filled'
b = 'filled'
c = 'empty'
d = 'empty'
e = 'filled'
f = 'empty'
g = 'filled'
testdict = {a : 'apple' , b : 'banana' , c : 'cake'
On 12/10/2013 09:56, reubennott...@gmail.com wrote:
I've been working on a program and have had to halt it due a slight problem.
Here's a basic version of the code:
a = 'filled'
b = 'filled'
c = 'empty'
d = 'empty'
e = 'filled'
f = 'empty'
g = 'filled'
testdict = {a : 'apple' , b : 'banana' ,
reubennott...@gmail.com writes:
[...] The following doesn't work.
for fillempt in testdict:
if fillempt == 'filled':
print(testdict[fillempt])
This is equivalent to
for fillempt in testdict:
if fillempt == 'filled':
print(testdict['filled'])
which in turn can be
On Saturday, October 12, 2013 10:20:24 AM UTC+1, Peter Otten wrote:
reubennott...@gmail.com wrote:
I've been working on a program and have had to halt it due a slight
problem. Here's a basic version of the code:
a = 'filled'
b = 'filled'
c = 'empty'
d = 'empty'
On 12/10/2013 12:03, reubennott...@gmail.com wrote:
On Saturday, October 12, 2013 10:20:24 AM UTC+1, Peter Otten wrote:
reubennott...@gmail.com wrote:
I've been working on a program and have had to halt it due a slight
problem. Here's a basic version of the code:
a = 'filled'
b