[프로그래머스] 연습문제/둘만의 암호(python)

Effy_ee·2023년 7월 31일
0

코딩테스트

목록 보기
32/118

📖 문제

연습문제(Lv.01) 둘만의 암호 👾
https://school.programmers.co.kr/learn/courses/30/lessons/155652

💻 다른사람 답안

def solution(s, skip, index):
    alpha = "abcdefghijklmnopqrstuvwxyz"
    answer = ""
    for i in list(skip):
        alpha = alpha.replace(i,"")
        
    for a in s:
        answer += alpha[(alpha.find(a) + index) % len(alpha)]
    return answer

0개의 댓글