Re: A string and an integer to appear in tuple (python 2.7)

2013-03-12 Thread Vlastimil Brom
2013/3/13 Jiewei Huang : > Hi all, > > I'm currently stuck at this question on > > Writing a function len_str that takes a string as an argument and returns a > pair consisting of the length of the string and the string itself. > > Example: len_str('Meaning of life') should return the tuple (15, '

Re: A string and an integer to appear in tuple (python 2.7)

2013-03-12 Thread Oscar Benjamin
On 13 March 2013 00:21, Jiewei Huang wrote: > Hi all, > > I'm currently stuck at this question on > > Writing a function len_str that takes a string as an argument and returns a > pair consisting of the length of the string and the string itself. > > Example: len_str('Meaning of life') should ret

A string and an integer to appear in tuple (python 2.7)

2013-03-12 Thread Jiewei Huang
Hi all, I'm currently stuck at this question on Writing a function len_str that takes a string as an argument and returns a pair consisting of the length of the string and the string itself. Example: len_str('Meaning of life') should return the tuple (15, 'Meaning of life'). I can only thi