parameters: (string, entities)
return_statement: return utils.output('end', 'completed_todos_listed', utils.translate('completed_todos_listed', {
  				'list': listname,
  				'result': result_completed_todos
  			}
  		)
  	)
docstring: View a to-do list
docstring_summary: View a to-do list
docstring_tokens: View a to - do list
function: def view_list(string, entities):
  	"""View a to-do list"""
  
  	# List name
  	listname = ''
  
  	# Find entities
  	for item in entities:
  		if item['entity'] == 'list':
  			listname = item['sourceText'].lower()
  
  	# Verify if the list exists
  	if db_lists.count(Query.name == listname) == 0:
  		return utils.output('end', 'list_does_not_exist', utils.translate('list_does_not_exist', { 'list': listname }))
  
  	# Grab todos of the list
  	todos = db_todos.search(Query.list == listname)
  
  	if len(todos) == 0:
  		return utils.output('end', 'empty_list', utils.translate('empty_list', { 'list': listname }))
  
  	unchecked_todos = db_todos.search((Query.list == listname) & (Query.is_completed == False))
  	completed_todos = db_todos.search((Query.list == listname) & (Query.is_completed == True))
  
  	result_unchecked_todos = ''
  	result_completed_todos = ''
  
  	if len(unchecked_todos) == 0:
  		utils.output('inter', 'no_unchecked_todo', utils.translate('no_unchecked_todo', { 'list': listname }))
  	else:
  		for todo in unchecked_todos:
  			result_unchecked_todos += utils.translate('list_todo_element', {
  				'todo': todo['name']
  			})
  
  		utils.output('inter', 'unchecked_todos_listed', utils.translate('unchecked_todos_listed', {
  					'list': listname,
  					'result': result_unchecked_todos
  				}
  			)
  		)
  
  	if len(completed_todos) == 0:
  		return utils.output('end', 'no_completed_todo', utils.translate('no_completed_todo', { 'list': listname }))
  
  	for todo in completed_todos:
  		result_completed_todos += utils.translate('list_completed_todo_element', {
  			'todo': todo['name']
  		})
  
  	return utils.output('end', 'completed_todos_listed', utils.translate('completed_todos_listed', {
  				'list': listname,
  				'result': result_completed_todos
  			}
  		)
  	)
function_tokens: def view_list ( string , entities ) : # List name listname = '' # Find entities for item in entities : if item [ 'entity' ] == 'list' : listname = item [ 'sourceText' ] . lower ( ) # Verify if the list exists if db_lists . count ( Query . name == listname ) == 0 : return utils . output ( 'end' , 'list_does_not_exist' , utils . translate ( 'list_does_not_exist' , { 'list' : listname } ) ) # Grab todos of the list todos = db_todos . search ( Query . list == listname ) if len ( todos ) == 0 : return utils . output ( 'end' , 'empty_list' , utils . translate ( 'empty_list' , { 'list' : listname } ) ) unchecked_todos = db_todos . search ( ( Query . list == listname ) & ( Query . is_completed == False ) ) completed_todos = db_todos . search ( ( Query . list == listname ) & ( Query . is_completed == True ) ) result_unchecked_todos = '' result_completed_todos = '' if len ( unchecked_todos ) == 0 : utils . output ( 'inter' , 'no_unchecked_todo' , utils . translate ( 'no_unchecked_todo' , { 'list' : listname } ) ) else : for todo in unchecked_todos : result_unchecked_todos += utils . translate ( 'list_todo_element' , { 'todo' : todo [ 'name' ] } ) utils . output ( 'inter' , 'unchecked_todos_listed' , utils . translate ( 'unchecked_todos_listed' , { 'list' : listname , 'result' : result_unchecked_todos } ) ) if len ( completed_todos ) == 0 : return utils . output ( 'end' , 'no_completed_todo' , utils . translate ( 'no_completed_todo' , { 'list' : listname } ) ) for todo in completed_todos : result_completed_todos += utils . translate ( 'list_completed_todo_element' , { 'todo' : todo [ 'name' ] } ) return utils . output ( 'end' , 'completed_todos_listed' , utils . translate ( 'completed_todos_listed' , { 'list' : listname , 'result' : result_completed_todos } ) )