Thank you very much! On Friday, December 19, 2014 2:55:57 PM UTC+1, Denis Lisov wrote: > > Hello Lei, > > > > As I learned, the comma in the syntax "print(elem)," will prevent the > use of > > newline character. Why does it not work here? > > This method of suppressing the newline is outdated. It was used with the > print statement in python2, but in python3 print is a function, so the > comma > does not work anymore. > > > How can I make the results in one line? > > You can do almost the same thing you tried to do > > for elem in [10, 20, 25, 27, 28.5]: > print(elem, end=" ") > > or just use the tuple unpacking when calling print > > print(*[10, 20, 25, 27, 28.5]) >
-- 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 http://groups.google.com/group/spyderlib. For more options, visit https://groups.google.com/d/optout.
