title: Why is there no output showing in this python code?
body: <pre><code>man=[]
  
  other=[]
  
  try:
      data=open('sketch.txt')
      for each_line in data:
          try:
              (role,line_spoken) = each_line.split(':',1)
              line_spoken= line_spoken.strip()
              if role == 'Man':
                  man.append(line_spoken)
              elif role == 'Other Man':
                  other.append(line_spoken)
          except ValueError:
              pass
      data.close()
  
  except IOError:
      print('The datafile is missing!')
  try:
      man_file=open('man_data.txt','w')
      other_file=open('other_data.txt','w')
      print(man, file=man_file)
      print(other, file=other_file)
      man_file.close()
      other_file.close()
  except IOError:
      print('File error.')
  </code></pre>
  
  <p>Shouldn't it create man_data and other_data file?
  There is no error message or any kind of input in the idle.</p>
  
  <p><a href="https://i.stack.imgur.com/V0pD3.png" rel="nofollow"><img src="https://i.stack.imgur.com/V0pD3.png" alt="enter image description here"></a></p>