Re: [Tutor] printing items form list

2017-03-03 Thread David Rock
> On Mar 3, 2017, at 13:42, dirkjso...@gmail.com wrote: > > On 03/03/2017 12:19 PM, Alan Gauld via Tutor wrote: >> >> That's one reason why join() is a better solution, it >> handles all of that for you. It's also faster, although >> in a small application you'd never notice the difference. >>

Re: [Tutor] printing items form list

2017-03-03 Thread dirkjso...@gmail.com
On 03/03/2017 12:19 PM, Alan Gauld via Tutor wrote: On 03/03/17 18:52, Peter Otten wrote: Antonio Zagheni via Tutor wrote: suitcase = ["book, ", "towel, ", "shirt, ", "pants"] Hm, looks like you opened Rafael's suitcase while he wasn't looking, and sneaked in some commas and spaces ;) That's

Re: [Tutor] printing items form list

2017-03-03 Thread Alan Gauld via Tutor
On 03/03/17 18:52, Peter Otten wrote: > Antonio Zagheni via Tutor wrote: > >> suitcase = ["book, ", "towel, ", "shirt, ", "pants"] > > Hm, looks like you opened Rafael's suitcase while he wasn't looking, and > sneaked in some commas and spaces ;) > > That's cheating... Its also very difficul

Re: [Tutor] printing items form list

2017-03-03 Thread David Rock
> On Mar 3, 2017, at 12:52, Peter Otten <__pete...@web.de> wrote: > > Antonio Zagheni via Tutor wrote: > >> suitcase = ["book, ", "towel, ", "shirt, ", "pants"] > > Hm, looks like you opened Rafael's suitcase while he wasn't looking, and > sneaked in some commas and spaces ;) > > That's cheati

Re: [Tutor] printing items form list

2017-03-03 Thread Peter Otten
Antonio Zagheni via Tutor wrote: > suitcase = ["book, ", "towel, ", "shirt, ", "pants"] Hm, looks like you opened Rafael's suitcase while he wasn't looking, and sneaked in some commas and spaces ;) That's cheating... ___ Tutor maillist - Tutor@py

Re: [Tutor] printing items form list

2017-03-03 Thread Antonio Zagheni via Tutor
#x27;pants'] in your luggage. -- Message: 2 Date: Fri, 03 Mar 2017 13:30:23 +0100 From: Peter Otten <__pete...@web.de> To: tutor@python.org Subject: Re: [Tutor] printing items form list Message-ID: Content-Type: text/plain; charset="ISO-8859-1"

Re: [Tutor] printing items form list

2017-03-03 Thread Mats Wichmann
On 03/03/2017 05:12 AM, Rafael Knuth wrote: > I want to print individual items from a list like this: > > You have a book, towel, shirt, pants in your luggage. > > This is my code: > > suitcase = ["book", "towel", "shirt", "pants"] > print ("You have a %s in your luggage." % suitcase) > > Inste

Re: [Tutor] printing items form list

2017-03-03 Thread Peter Otten
Rafael Knuth wrote: > I want to print individual items from a list like this: > > You have a book, towel, shirt, pants in your luggage. > > This is my code: > > suitcase = ["book", "towel", "shirt", "pants"] > print ("You have a %s in your luggage." % suitcase) > > Instead of printing out the