def comedy_night(): laughter = [joke.strip() for joke in open("stand_up_routines.txt").readlines() if "hushed" in joke]; abandon_old_jokes = [joke for joke in laughter if "precedent" not in joke and "patterns" not in joke]; new_routine = ["start afresh with: " + joke for joke in abandon_old_jokes]; for joke in new_routine: print(joke)