title: Python, How to stop my code from showing position of my CSV file (No Panda)
body: <p>The code I have written gives me the desired output (takes data from csv file) but it shows the position of the function, which is something I do not want.</p>
  <p>Here's my code:</p>
  <pre><code># Functions
  import sys
  from collections import Counter
  import csv
  
  def NC(filename: list) -&gt; str:
      print(&quot;----&quot;)
      print(&quot;Precondition: You must type the FULL name of the genre with the EXACT same capital/lower case lettering.&quot;)
      print(&quot;----&quot;)
      
      x = input(&quot;Enter the category of the books: &quot;)
      
      category = []
  
      with open('Google_Books_Dataset.csv', 'r') as csv_file:
          csv_reader = csv.DictReader(csv_file)
          c = Counter(row['generes'] for row in csv_reader)
          result = print(c[x])
          category.append(result)
      return category
  
  def CA(filename: list) -&gt; str:
      print(&quot;----&quot;)
      print(&quot;Precondition: You must type the author's FULL name with the EXACT same capital/lower case lettering.&quot;)
      print(&quot;----&quot;)
      
      x = input(&quot;Enter the author's FULL name: &quot;)
      
      author_name = []
      with open('Google_Books_Dataset.csv', 'r') as csv_file:
          csv_reader = csv.DictReader(csv_file) 
          
          for row in csv_reader:
              result = {'author': row['author'], 'category': row['generes']}
              del result['author']
      
              if (row['author'] in x):
                  author_name.append(result)
      print(list(author_name))
      return author_name
  
  def CB(filename: list) -&gt; str:
      print(&quot;----&quot;)
      print(&quot;Precondition: You must type the book's FULL name with the EXACT same capital/lower case lettering and special symbols (e.g. $ or *).&quot;)
      print(&quot;----&quot;)
      
      x = input(&quot;Enter the book's FULL name: &quot;)
      
      book_name = []
      with open('Google_Books_Dataset.csv', 'r') as csv_file:
          csv_reader = csv.DictReader(csv_file) 
              
          for row in csv_reader:
              result = {'title': row['title'], 'category': row['generes']}
              del result['title']
      
              if (row['title'] in x):
                  book_name.append(result)
      print(list(book_name))
      return book_name
  
  def Q(x: str) -&gt; str:
      x = input(&quot;Enter quit: &quot;)
      if (x == &quot;quit&quot;):
          print(&quot;END&quot;)
          sys.exit()    
  
  # Command Line
  print(&quot;Precondition: ALL commands must be of capital case.&quot;)
  print(&quot;----&quot;)
  
  x = input(&quot;Enter command: &quot;)
  List = [&quot;NC&quot;, &quot;CA&quot;, &quot;CB&quot;, &quot;Q&quot;]
  
  while (x != List): 
  
      if x == List[0]:
          name = []
          NC(name)
          print(NC)
              
      if x == List[1]:   
          name = []
          CA(name)
          print(CA)
              
      if x == List[2]:
          name = []
          CB(name)
          print(CB)
      
      if x == List[3]:
          name = []
          Q(name)
          print(Q)
      else:
          x = input(&quot;Enter command: &quot;)
  </code></pre>
  <p>All of my functions always give back the function position, I don't know why.</p>
  <p>For example, if I run my code and enter a command (Like NC), then my out would be:</p>
  <pre><code>Precondition: ALL commands must be of capital case.
  ----
  Enter command: NC
  ----
  Precondition: You must type the FULL name of the genre with the EXACT same capital/lower case lettering.
  ----
  Enter the category of the books: Fiction
  39
  &lt;function NC at 0x0000018E43A95670&gt;
  Enter command: ...
  </code></pre>
  <p>The <strong>&lt;function NC at 0x0000018E43A95670&gt;</strong> is not wanted. And all my other codes, other than the Quit command yield the position as well. How should I work around this?</p>