Re: I am out of trial and error again Lists

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 4:55 PM, Rustom Mody wrote: > So give me a valid (ie useful) use where instead of the usual > l=[1,2,3] > l.append(4) > > we have > > foo(l.append(4)) Given that l.append(4) will always return None, there's not a lot of point passing that return value to something, unless

Re: I am out of trial and error again Lists

2014-10-24 Thread Larry Hudson
On 10/24/2014 09:37 AM, Seymore4Head wrote: import string Not needed, delete it. def nametonumber(name): lst=[] nx=[] digit=[] Not needed. You create digit as an empty list, them immediately follow by assigning a string to it (NOT a _list_ of characters, but an actual string

Re: I am out of trial and error again Lists

2014-10-24 Thread Larry Hudson
On 10/24/2014 12:07 PM, Seymore4Head wrote: On Fri, 24 Oct 2014 19:40:39 +0100, Mark Lawrence How many more times, state what you expect to happen and what actually happens. "doesn't work" is useless. Please read this http://sscce.org/ Good suggestion. OK how is this? It doesn't print wha

<    1   2