[Tutor] Printing with no newline :(
Joe Batt
joebatt at hotmail.co.uk
Sun Nov 6 07:31:28 CET 2011
I am learning Python 3 and programming and am very new so please bear with me…
I am writing a program to pull out specific characters in a sequence and then print then out. So far so good however when the characters are printed out they pint on separate lines as opposed to what I want, all on the same line. I have tried \n and just , in the pint statement i.e. print(letterGroup[4],) and print(letterGroup[4]\n) and even print(letterGroup[4],/n)……..
Can anyone help and explain please….Thank you
for line in file: m = re.search(regexp, line) if m: letterGroup=m.group(0) print(letterGroup[4])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111106/86d92644/attachment.html>
More information about the Tutor
mailing list