On 6 November 2011 15:47, Dave Angel <d...@davea.name> wrote:

> On 11/06/2011 04:45 AM, Sarma Tangirala wrote:
>
>> On 6 November 2011 13:11, Peter Otten<__pete...@web.de>  wrote:
>>
>>  Joe Batt wrote:
>>>
>>>  I am learning Python 3 and programming and am very new so please bear
>>>>
>>> <SNIP>
>>>
>>>  for item in items:
>>>>>>
>>>>> ...     print(item, end="WHATEVER")
>>>
>>>
>> Another way of writing the above.
>>
>> for i in items:
>>      print item[i], "whatever", "\n"
>>
>>
>>  Nope. That would put a newline between each iteration, which is
> explicitly what the OP did not want.  More importantly, it'd give a syntax
> error in Python 3, which the OP carefully specified.
>
> --
>
> DaveA
>
>

I'm sorry. Didn't notice the python 3 part, I just joined the list and did
not look at the OPs post. Sorry about that.

Please bear with me on this, but does the following not print "end" for
every iteration of "items"?

for item in items:
     print(item, end="")




-- 
Sarma Tangirala,
Class of 2012,
Department of Information Science and Technology,
College of Engineering Guindy - Anna University
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to