From 5fab5e7045581c75e3bd8ad92dd29ead0185b0c6 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Sat, 2 Dec 2023 02:35:00 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- glob/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glob/README.md b/glob/README.md index df3bdf4..af6c7e9 100644 --- a/glob/README.md +++ b/glob/README.md @@ -41,7 +41,7 @@ list = glob.glob("*.mat") print(list) ``` -```python console +```python ['Testfile_1.mat', 'Testfile_2.mat', 'Testfile_10.mat', 'Testfile_3.mat'] ``` @@ -54,7 +54,7 @@ list = sorted(glob.glob("*.mat")) print(list) ``` -```python console +```python ['Testfile_1.mat', 'Testfile_10.mat', 'Testfile_2.mat', 'Testfile_3.mat'] ``` Hmmm... This result is not helpful. @@ -73,7 +73,7 @@ list = natsorted(glob.glob("*.mat")) print(list) ``` -```python console +```python ['Testfile_1.mat', 'Testfile_2.mat', 'Testfile_3.mat', 'Testfile_10.mat'] ``` @@ -89,7 +89,7 @@ for filename in natsorted(glob.glob("*.mat")): print(filename.rsplit(".", 1)[0]) ``` -```python console +```python Testfile_1 Testfile_2 Testfile_3 @@ -107,7 +107,7 @@ filenames = list(map(lambda s: s.rsplit(".", 1)[0], filenames)) print(filenames) ``` -```python console +```python ['Testfile_1', 'Testfile_2', 'Testfile_3', 'Testfile_10'] ```