I am writing a Caesar cipher program and i need to keep my values within the range of 32 and 126 ( the printable ascii set) when it encrypts itself. so when it gets to 126 it loops back to 32
here is the code
print("enter sentence to encrypt:")
string = input()
print("Please enter positive offset value:")
value = int(input())
finalstring = [ord(c) for c in string]
finalstring[:] = [c + value for c in finalstring]
finalstring = ''.join(chr(i) for i in finalstring)