On 8/8/19 12:26 PM, Paolo G. Cantore wrote:
> I think the special case treatment could be avoided.
>
> First: Join all items with ' and '
> Second: Replace all ' and ' with ', ' except the last
That works great, until one of the elements of the original list is
"spam and eggs":
>>> spam =
Am 08.08.19 um 01:18 schrieb MRAB:
On 2019-08-07 21:36, Kuyateh Yankz wrote:
#trying to write a function that takes a list value as an argument and
returns a string with all the items separated by a comma and a space,
with and inserted before the last item. For example, passing the
previous
On 2019-08-07 21:36, Kuyateh Yankz wrote:
#trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous spam list to the function would
#trying to write a function that takes a list value as an argument and returns
a string with all the items separated by a comma and a space, with and inserted
before the last item. For example, passing the previous spam list to the
function would return 'apples, bananas, tofu, and cats'. But
I need a jolt here with my python excercise, please somebody!! How can I
make my functions work correctly? I tried below but I get the following
error:
if f_dict[capitalize]:
KeyError: function capitalize at 0x00AE12B8
Code below:
def capitalize (s):
capitalize accepts a string parameter
On 2011.06.03 09:42 AM, Cathy James wrote:
I need a jolt here with my python excercise, please somebody!! How can
I make my functions work correctly? I tried below but I get the
following error:
if f_dict[capitalize]:
KeyError: function capitalize at 0x00AE12B8
...
def capitalize (s):
On 06/03/2011 09:42 AM, Cathy James wrote:
I need a jolt here with my python excercise, please somebody!! How can I
make my functions work correctly? I tried below but I get the following
error:
if f_dict[capitalize]:
KeyError:function capitalize at 0x00AE12B8
def capitalize (s):
Here you
On Fri, Jun 3, 2011 at 7:42 AM, Cathy James nambo...@gmail.com wrote:
I need a jolt here with my python excercise, please somebody!! How can I
make my functions work correctly? I tried below but I get the following
error:
if f_dict[capitalize]:
KeyError: function capitalize at 0x00AE12B8
On 01/-10/-28163 02:59 PM, Cathy James wrote:
I need a jolt here with my python excercise, please somebody!! How can I
make my functions work correctly? I tried below but I get the following
error:
if f_dict[capitalize]:
KeyError:function capitalize at 0x00AE12B8
Code below:
def capitalize