Nov-10-2020, 08:47 PM
I try to find all characters from the given list and replace them with one character. I`m getting "object has no attribute 'replaceall' ?
list = 'bcdfghjklmnpqrstuvwxyzBCDFGHJKLMNPQRSTUVWXYZ'
string = "aabbccddeeff"
string2 = string.replaceall(list, "!")
print(string2)
I would like to get: !!bbccdd!!ff as a and e are not on the list.
list = 'bcdfghjklmnpqrstuvwxyzBCDFGHJKLMNPQRSTUVWXYZ'
string = "aabbccddeeff"
string2 = string.replaceall(list, "!")
print(string2)
I would like to get: !!bbccdd!!ff as a and e are not on the list.