import string
str1 = '/*dave is @architect & telephone!!'
symbols = string.punctuation
for char in str1:
if char in symbols:
str2 = str1.replace(char,"#")
print(str2)
thats what i tried and the result is:
/*dave is @architect & telephone##
cant seem to understand why its only changing the last 2 chars