title: filter object at python 3.X
body: <p>In <strong>python 3.X</strong>, I've been writing these codes :</p>
  
  <p>One function for "text_tokenizing" and another one for "remove extra characters". 
  In "remove_characters_after_tokenization" function I used "filter".</p>
  
  <p>My problem: When I run my project I see this line in console :</p>
  
  <pre><code>&lt;filter object at 0x00000277AA20DE48&gt; &lt;filter object at 0x00000277AA44D160&gt; &lt;filter object at 0x00000277AA44D470&gt;
  </code></pre>
  
  <p>How can I solve this issue?</p>
  
  <p>This is my project's code :</p>
  
  <pre><code>import nltk
  import re
  import string
  from pprint import pprint
  
  corpus = ["The brown fox wasn't that quick and he couldn't win the race",
            "Hey that's a great deal! I just bought a phone for $199",
            "@@You'll (learn) a **lot** in the book. Python is an amazing language !@@"]
  
  
  
  # Declare a function for "Tokenizing Text"
  def tokenize_text(text):
      sentences = nltk.sent_tokenize(text)
      word_tokens = [ nltk.word_tokenize(sentence) for sentence in sentences]
      return word_tokens
  
  # Declare a function for "Removing Special Characters"
  def remove_characters_after_tokenization(tokens):
      pattern = re.compile('[{}]'.format(re.escape(string.punctuation)))
      filtered_tokens = list(filter(None, [pattern.sub('', token) for token in tokens]))
      return filtered_tokens
  
  
  token_list = [tokenize_text(text) for text in corpus]
  pprint(token_list)
  
  filtered_list_1 = list(filter(None,[remove_characters_after_tokenization(tokens)
                                  for tokens in sentence_tokens])
                     for sentence_tokens in token_list)
  
  print(type(filtered_list_1))
  print(len(filtered_list_1))
  print(filtered_list_1)
  </code></pre>