I'm learning python and came across this behavior which puzzles me.
Why does this code print out the variables enclosed by parenthesis and \r\n:
def print_a_line(line_count, f):
print(line_count, f.readline())
current_line = 1
print_a_line(current_line, current_file)
Prints:
(1, 'a1\r\n')
while this code:
def print_a_line(line_count, f):
print(f.readline())
current_line = 1
print_a_line(current_line, current_file)
prints without the parenthesis:
a1