Python Code Examples

> SKU: Python Code Examples
(1 customer review)

Sure, by now maybe you know that Python is a super popular programming language used by everyone from web developers to data scientists to financial wizards (meaning that once you learn Python, the doors are wide open as far as your career options in tech). Buuut you might still be wondering what exactly Python LOOKS like and how it works.

Compare

Description

Sure, by now maybe you know that Python is a super popular programming language used by everyone from web developers to data scientists to financial wizards (meaning that once you learn Python, the doors are wide open as far as your career options in tech). Buuut you might still be wondering what exactly Python LOOKS like and how it works. This Python code finds all mp3 files on your computer.

import fnmatch
import os

rootPath = '/'
pattern = '*.mp3'

for root, dirs, files in os.walk(rootPath):
    for filename in fnmatch.filter(files, pattern):
        print(os.path.join(root, filename))

Review (1)

5.0
1
0
0
0
0

Add a review

  1. WebsiteURL.org

%d bloggers like this: