Created
March 24, 2020 09:20
-
-
Save frankhn/edeae81e7b34def3d11939808bd62a31 to your computer and use it in GitHub Desktop.
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
name = 'German_shepherd_dog_04890.jpg' | |
name1= 'Boston_terrier_02303.jpg' | |
name2='Beagle_01170.jpg' | |
name3='Miniature_schnauzer_06884.jpg' | |
# label = name.rsplit('.', 1)[0] | |
label = ''.join([i for i in name2.rsplit('.', 1)[0] if not i.isdigit()]).replace("_", ' ').strip() | |
print label |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment