Skip to content

Instantly share code, notes, and snippets.

#! /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:
#! /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:
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)