Last active
May 31, 2022 07:44
-
-
Save abersheeran/1c929dfa764dfdd49fa64a588af29ee9 to your computer and use it in GitHub Desktop.
Determines whether a string is a Windows path.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
is_windows_path = lambda path: bool(re.compile(r"^[a-zA-Z]:").match(path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment