title: how to concatenate file line sentence in one string in python?
body: <p>hi i am learning python please help me
  I am reading a file, line-by-line and i want output for line of words in one String:</p>
  
  <p>for Example 
  input file name file.txt and content have file below mentation</p>
  
  <p>Y</p>
  
  <p>X   Y</p>
  
  <p>K   Y</p>
  
  <p>L   Y</p>
  
  <p>expected output</p>
  
  <p>Y</p>
  
  <p>XY</p>
  
  <p>KY</p>
  
  <p>LY</p>