''' Creates a substitution cypher Author: Tim Pierson, Dartmouth CS55, Winter 2021 based on an example from Wenliang Du ''' import random if __name__ == '__main__': #define alphabet (here only lower case) plain = "abcdefghijklmnopqrstuvwxyz" #select a letter from alphabet to replace each letter cypher = random.sample(plain,len(plain)) #output cipher print(''.join(cypher))