On Wed, Jun 6, 2018 at 2:22 AM, Rajat <[email protected]> wrote:

>
>
> On Friday, December 19, 2014 at 4:55:43 PM UTC+5:30, Lei wrote:
>>
>> Hi experts,
>>
>> I am using python 3.
>>
>> for elem in [10, 20, 25, 27, 28.5]:
>>
>>     print(elem),
>>
>>
>> But the results are
>>
>>
>> 10
>>
>> 20
>>
>> 25
>>
>> 27
>>
>> 28.5
>>
>> As I learned, the comma in the syntax "print(elem)," will prevent the use
>> of newline character. Why does it not work here?
>>
>> How can I make the results in one line? Like
>>
>>
>> 10 20 25 27 28.5
>>
>>
>> I know I can use
>>
>> print([elem , end=',')
>>  but doing this i am getting commas i dont need commas
>>
> 10 ,20, 25 ,27 ,28.5,
> please help
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/spyderlib.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to