《python基础教程》答案(第八章)
Ch8.py
# created by swy
"""
solutions to beginning python
"""
import time
import os
import operator
import shutil
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,)
def print_dir<