title: Python: What does parenthesis () after a variable name mean?
body: <p>Towards the bottom at the main loop, I'm seeing this line</p>
  
  <p><code>result = result()</code></p>
  
  <p>But I have no idea what it does and I can't even Google it.
  <strong>What is this?</strong></p>
  
  <p>The code below imports from task.py and project.py. But both files do not have anything related to result() hence I'm not including them here.</p>
  
  <pre><code>#!/usr/bin/env python3
  
  from task import Task
  from project import Project
  
  main_menu = {
      'title': 'MAIN MENU',
      'items': ['1. Create a project', '2. Load a project', '3. Quit'],
      'actions': {
          '3': exit,
      }
  }
  
  project_menu = {
      'title': 'PROJECT MENU',
      'items': ['1. Add a task', '2. Add task dependency', '3. Set task progress',
              '4. Show project', '5. Back to Main Menu'],
      'actions': {
          '5': main_menu,
      }
  }
  
  def select_menu(menu):
      while True:
          print()
          print(menu['title']) #MAIN MENU
          print('\n'.join(menu['items'])) #1. create project, 2. load project ..
          selection = input('Select &gt; ')
          next_action = menu['actions'].get(selection)
          #print(selection, menu['actions'])
          if next_action:
              return next_action
          else:
              print('\nPlease select from the menu')
  
  def create_project():
      global cur_project
      global project_menu
  
      project_name = input('Enter the project name: ')
      cur_project = Project(project_name)
  
      return project_menu
  
  main_menu['actions']['1'] = create_project
  
  cur_menu = main_menu
  cur_project = None
  
  while True:
      result = select_menu(cur_menu)
  
      while callable(result):
          result = result()
  
      cur_menu = result
  </code></pre>