MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / shift

Function shift

Misc/Caesar_Cipher_Encryptor/solution2.py:4–14  ·  view source on GitHub ↗

this function shifts the position of an existing list or string and returns it as a new list

(list, num)

Source from the content-addressed store, hash-verified

2
3
4def shift(list, num):
5 """
6 this function shifts the position of an existing list or string and returns it as a new list
7 """
8 list = [x for x in list]
9 for i in range(num):
10 first = list[0]
11 list.pop(0)
12 list.append(first)
13
14 return list
15
16
17def cipher(string, key):

Callers 1

cipherFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected