J
John
Hi.
I have a dictionary thus: (wraps)
p1hand =
{'b12':b12,'d12':d12,'d23':d23,'n12':n12,'n23':n23,'n34':n34,'p12'12,'
p23'23,'p34'34,'p45'45}
I set a variable called p1handlist so that I can print a list of the
keys to the screen:
p1handlist = p1hand.keys()
print p1handlist
and the output looks like this:
['b12', 'd12', 'd23', 'n12', 'n23', 'n34', 'p12', 'p23', 'p34', 'p45']
how can I make it so that the output looks more like this?:
b12, d12, d23, n12, n23, n34, p12, p23, p34, p45
This is for a simple text mode game I am writing and the output to the
screen is important because at times the list gets too big to print on
one line of the display.
Thanks!
John
I have a dictionary thus: (wraps)
p1hand =
{'b12':b12,'d12':d12,'d23':d23,'n12':n12,'n23':n23,'n34':n34,'p12'12,'
p23'23,'p34'34,'p45'45}
I set a variable called p1handlist so that I can print a list of the
keys to the screen:
p1handlist = p1hand.keys()
print p1handlist
and the output looks like this:
['b12', 'd12', 'd23', 'n12', 'n23', 'n34', 'p12', 'p23', 'p34', 'p45']
how can I make it so that the output looks more like this?:
b12, d12, d23, n12, n23, n34, p12, p23, p34, p45
This is for a simple text mode game I am writing and the output to the
screen is important because at times the list gets too big to print on
one line of the display.
Thanks!
John