Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NormalizedTags
#python 2.7.12 def NormalizeTag(TagToClean): NormalizedTag = TagToClean CharsToRemove = [' ', '\'',] CharsToReplaceWithDash = ['&', '/', ','] for char in CharsToRemove: NormalizedTag = NormalizedTag.replace(char, '') for char in CharsToReplaceWithDash: NormalizedTag = NormalizedTag.replace(char, '-') return NormalizedTag print "BARRON'S -->",NormalizeTag("BARRON'S") print "CONSUMER SALES & MARKETING -->",NormalizeTag("CONSUMER SALES & MARKETING") print "CORPORATE, OTHER -->", NormalizeTag("CORPORATE, OTHER") print "NEWS/WSJ -->", NormalizeTag("NEWS/WSJ") print "TECHNOLOGY - PROD & ENG -->", NormalizeTag("TECHNOLOGY - PROD & ENG")
run
|
edit
|
history
|
help
0
ab.py
Supermarket prices and stock
Lists
NewFoodTipper
e742c63f03ab602f2b38433ffc28b5145ba1332d
20/2
BatterScore
codeacademy python tasks
Demo - Test
binary_4