task 6 and 7

This commit is contained in:
2020-11-08 12:26:55 +01:00
parent 755488dc5f
commit 1b192ad7d2

View File

@@ -20,4 +20,11 @@ class Exercise00:
return "{2} - {1} - {0}" return "{2} - {1} - {0}"
if mode == "dict": if mode == "dict":
return "x, y = ({x}, {y})" return "x, y = ({x:.1f}, {y:.04f})"
def listfiles(self, directory, filetype=''):
from pathlib import Path
path = Path(directory)
for file in path.glob('**/*'+filetype):
yield str(file.name)