2018.6.10 def print_line_lengths(): a = open("text.txt", "r") text = a.readlines() for line in text: print(len(line)) def split_fully(path): parent_path, name = os.path.split(path) if name == "": return parent_path, else: return split_fully(parent_path) + (name,)