Answers for "''.join(s)"

0

''.join(s)

def solution(s, n):
    answer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' * (n + 1)
    s = list(s)
    for i in range(len(s)):
        a = ord(s[i].upper())
        if s[i] == ' ':
            continue
        if s[i] in answer:
            s[i] = answer[(a + n) % 65]
        else:
            s[i] = answer[(a + n) % 65].lower()
    return ''.join(s)
Posted by: Guest on July-01-2021

Browse Popular Code Answers by Language