Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

'.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)
Comment

PREVIOUS NEXT
Code Example
Python :: django amzon like app 
Python :: add values to pandas plot 
Python :: extracts attribute python xml 
Python :: python generator in while loop 
Python :: how to shorten turtle. to t. 
Python :: python delete directory even if not empty 
Python :: upperWhite = np.array([109, 255, 255]) 
Python :: python unresolved import local visual studio code 2019 
Python :: pandas data frame from part of excel easy 
Python :: seaborn heatmap spearman correlation coefficient 
Python :: blakyubeuiwbciwcqiby7ib.py 
Python :: explore data dataframe pandas 
Python :: python drop in tuple 
Python :: python long numbers as string 
Python :: when was python 3.8 released 
Python :: pandas backward fill after upsampling 
Python :: using the return statement, defining a function, with input from the user. 
Python :: test a decorator python 
Python :: checking if something is true. infinite 
Python :: place parameters tkinter 
Python :: split dataset folders in train test valid using python 
Python :: postgtres settings.py setup with django 
Python :: difference_update() Function of sets in python 
Python :: numpy retrieve 5 highest value index 
Python :: how to fix value error in model.fit 
Python :: python backtest 
Python :: python how to not allow class instance 
Python :: database access layer django 
Python :: how to detect if a key was press down 
Python :: display calendar 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =