This question already has an answer here:
Since I have not reached to the commenter level I am unable to participate, I was reading How to print in Python without newline or space? an article pertaining to an issue I had. I think the answers given to a simple question where unnecessarily complicated, here is my solution very simple no imports either.
for x in 'abcdefghijkl':
print 'b'+x,
will give you abcdefghijkl just as it appears in the string less there is a n inserted there will be no spaces printed after the , in the print statement either
Aucun commentaire:
Enregistrer un commentaire