Method Of Characteristics Python