Below is the snippet to remove a string from python list of strings
a = ['fname_encr','lname_encr','address_encr'] # encr = encrypted value column
a = list(map(lambda x: x.replace('_encr',''),a)
print(a) #python 3
> ['fname','lname','address']
Comments
Post a Comment
Your Comments are more valuable to improve. Please go ahead