title: Python SyntaxError: invalid syntax end=''
body: <p>I am studying the book "Head First Python" and I'm having trouble this code:</p>
  
  <pre><code>data = open('sketch.txt')
  
  for each_line in data:
      (role, line_spoken) = each_line.split(':')
      print(role, end='')
      print(' said: ', end='')
      print(line_spoken, end='')
  
  data.close()
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>  File "Aula 3.py", line 12
        print(role, end='')
                 ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>sketch.txt:</p>
  
  <pre><code>Man: Is this the right room for an argument?
  Other Man: I've told you once.
  Man: No you haven't!
  Other Man: Yes I have.
  Man: When?
  Other Man: Just now.
  Man: No you didn't!
  Other Man: Yes I did!
  Man: You didn't!
  Other Man: I'm telling you, I did!
  Man: You did not!
  Other Man: Oh I'm sorry, is this a five minute argument, or the full half hour?
  Man: Ah! (taking out his wallet and paying) Just the five minutes.
  Other Man: Just the five minutes. Thank you.
  Other Man: Anyway, I did.
  Man: You most certainly did not!
  Other Man: Now let's get one thing quite clear: I most definitely told you!
  Man: Oh no you didn't!
  Other Man: Oh yes I did!
  Man: Oh no you didn't!
  Other Man: Oh yes I did!
  Man: Oh look, this isn't an argument!
  (pause)
  Other Man: Yes it is!
  Man: No it isn't!
  </code></pre>
  
  <p>I'm two days trying to figure out why the code is not working. The error is always shown in "end =''".</p>