为什么这给了我错误'return' outside function
?
Result = ""
char = ""
# Let char loop over each character in the input string
a = list(s)
for i in range (0, len(s)):
# If this char is a letter:
if (type(a[i])=='str'):
# Set char_low to be char converted to lower case
char_low = a.lower()
print a
# Note: the next 5 lines do not need to be changed -
# they will modify the character as necessary
if char_low <= 'm':
dist = 13
else:
dist = -13
char = chr(ord(char) + dist)
# Push char onto the end of the result
result = result + char
# Return the encrypted text
return result