Added function to convert ~ to a tuple.