I\'ve searched on how to do this in python and I can\'t find an answer. If you have a string:
>>> value = \'abc\'
How would you
Very simple four line piece of code:
finalMessage=""
for x in range (0,len(value)):
finalMessage+=(chr(ord(value[x])+1))
print(finalMessage)
It goes through each letter in the string and adds one to it, but this doesn't work with "z", so you could do:
value="abc testing testing, or sdrshmf"
finalMessage=""
for x in range(0,len(value)):
if ord(value[x]) in range(97,123):
finalMessage+=(chr(((ord(value[x])-96)%26)+97))
elif ord(value[x]) in range(65,91):
finalMessage+=(chr(((ord(value[x])-64)%26)+65))
else:
finalMessage+=value[x]
print(finalMessage)