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
s:   1. printing items form list (Rafael Knuth)   2. Re: printing items form list (Peter Otten) -- Message: 1 Date: Fri, 3 Mar 2017 13:12:23 +0100 From: Rafael Knuth To: "Tutor@python.org" Subject: [Tutor] printing items form list Message

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

[Tutor] printing items form list

2017-03-03 Thread Rafael Knuth
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 items on the list, my code appends the li