def read_paths(source):
	"""Returns a list of lists according to the specifications in a config file, (source).

	source contains path specifications of the form:
	origin > direction > destination.

	read_paths() interprets each line as a list with three elements, containing exactly those attributes. Each list is then added to a larger list, `paths`, which is returned."""

	file = open(source)
	paths = file.readlines()
	if paths == []:
		print("No rooms exist! Exiting program...")
		exit()
	all_paths = []	
	i = 0
	while i <len(paths):
		path_splite = []
		line = paths[i].strip()
		path = line.split(" > ") # splite three element
		path_splite.append(path[0]) #put element in a list
		path_splite.append(path[1]) 
		path_splite.append(path[2])
		all_paths.append(path_splite) #put the all path list in a list
		i += 1
	file.close()
	return all_paths