How can I remove function's 'none' output?
import random def random_value(x,y): y = ord(y)+x return chr(y) def random_value1(x,y): y = ord(y)-x return chr(y) def encryption(a,b): infile = open("e:\\temp\\security.txt","r") outfile = open("e:\\temp\\"+a+".txt","w") security = infile.read() for i in security: outfile.write(random_value(b,i)) print("encryption success") infile.close() outfile.close() def decryption(a,b): c = input("decryption file name : ") infile = open("e:\\temp\\"+c+".txt","r") outfile = open("e:\\temp\\"+a+".txt","w") security = infile.read() for i in security: outfile.write(random_value1(b,i)) print("decryption success") infile.close() outfile.close() while True: a=input("encryption / decryption : ") if not a: break b=input("file name : ") c=int(input("secret key : ")) if a=="encryption": print(encryption(b,c)) elif a=="decryption": print(decryption(b,c)) else: break