title: Using split to get particular words in python
body: <p>Suppose I have a text file like the one given below.</p>
  <pre><code>EVENTS 16623232889 {&quot;log&quot;: &quot;Hello I am someone&quot;, &quot;stream&quot;: &quot;a&quot;, &quot;cluster-name&quot;: &quot;432&quot;} 3232
  EVENTS 16623232890 {&quot;log&quot;: &quot;I am doing something.&quot;, &quot;stream&quot;: &quot;b&quot;, &quot;cluster-name&quot;: &quot;432&quot;} 2321
  EVENTS 16623232891 {&quot;log&quot;: &quot;bbye&quot;, &quot;stream&quot;: &quot;c&quot;, &quot;cluster-name&quot;: &quot;432&quot;} 231231
  EVENTS 16623232892 {&quot;log&quot;: &quot;bbyee&quot;, &quot;stream&quot;: &quot;d&quot;, &quot;cluster-name&quot;: &quot;432&quot;} 23123212
  </code></pre>
  <p>I want to just get the words which are present in the log. For example the output should be <code>Hello I am someone I am doing something. bbye bbyee</code></p>
  <p>I do know that I can remove the event and event number using the code given below but not sure how to go ahead with it now</p>
  <pre><code>file_name = &quot;a.json&quot;
  with open(file_name) as f1:
      lines = f1.readlines()
  
  for i, line in enumerate(lines):
      lines[i] = line.split(&quot; &quot;, 2)[2]
  lines = str(lines)
  for i, line in enumerate(lines):
      lines[i] = line.split(&quot; &quot;, 2)[2]
  lines = str(lines)
  </code></pre>