Plz help me in this code... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Plz help me in this code...

str1=str(input()) str2=str1.lower() h=str2.split() k=0 for a in h: for i in a: j=ord(i) k=j-96 c=a.count(i) a.replace(i,chr(122-k),c) u=''.join(a) print(u)

8th Aug 2020, 2:04 PM
Jayendra Todawat
Jayendra Todawat - avatar
1 Answer
+ 1
.replace() does not occur in place, it returns a value so should be used like a = a.replace() Your .join() statement will not work correctly
8th Aug 2020, 5:59 PM
JME