Last active
May 19, 2020 14:42
-
-
Save oliviano/bb19ee774fedb0f2dde62b786cb666d7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#format command | |
print('my super duper variable is {} and it is currently setting at: {}' .format(x,y)) | |
# with ordered fetching | |
{1} {2} for ordered element fetching aka print('my super slinky {2} and {1}'.format(bobs,bits)) | |
#Re | |
opName = 'my fucketed up;sdf 1234 string$' | |
opName2 = re.sub('\W+','_', opName) | |
-> my_fucketed_up_sdf_1234_string_ | |
opName3 = re.sub('[:-;$]','_',productName) # swap any char between '[]' to '_' inside produName (string) | |
my fucketed up_sdf 1234 string_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment