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
#! /usr/local/bin/python3 | |
""" This script is to rename the files | |
"Friends Season ## Episode ## - *.avi" | |
to | |
"Friends S##E## - *.avi" | |
Example: | |
This: | |
"Friends Season 09 Episode 01 - The One Where No One Proposes.avi" | |
will be changed to: |
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
#! /usr/local/bin/python3 | |
""" This script is to rename the files | |
"Friends Season ## Episode ## - *.avi" | |
to | |
"Friends S##E## - *.avi" | |
Example: | |
This: | |
"Friends Season 09 Episode 01 - The One Where No One Proposes.avi" | |
will be changed to: |
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
def is_isogram(string): | |
string_lower = string.lower() | |
for i in string_lower: | |
if not i.isalpha(): | |
continue | |
for n in range(string_lower.index(i) - 1, string_lower.index(i) - len(string_lower), -1): | |
if string_lower[n] == i: | |
print("\"%s\" is not an isogram.") % (string) | |
return False | |
print("\"%s\" is an isogram!") % (string) |