My function is supposed to take a string argument as input, and return the rot-13 encoding of the input string.
def str_rot_13(string):
c = list(string)
for num in c:
if ord(num) >= ord('a') and ord('z'):
if ord(num) >=('m'):
ord(num) -=13
else:
ord(num) +=13
elif ord(num) >= ord('A') and ord('Z'):
if ord(num) >=('M'):
ord(num) -=13
else:
ord(num) +=13
z += chr(ord(num))
return z
It's giving me a "can't assign to function call" error. I'm not sure what I'm doing wrong.