Independent counsel Lawrence E. Walsh told two federal courts this week that lifting the secrecy surrounding the contempt-of-court action against Marine Lt. Col. Oliver L. North would not impede the work of the federal grand jury investigating the Iran-contra affair.

Walsh took the position in response to petitions filed last Friday by The Washington Post, The Wall Street Journal and Public Citizen in the U.S. Court of Appeals here and before chief U.S. District Court Judge Aubrey E. Robinson.

Papers in the case have been sealed since May 8 when, sources said, Robinson secretly found North in contempt for refusing, on constitutional grounds, to comply with a grand jury subpoena demanding a sample of his handwriting. The Court of Appeals granted North a stay while his lawyers pursued their contention that Walsh's status as a court-appointed prosecutor under the Ethics in Government act is unconstitutional.

The appellate court held a public hearing earlier this month on the constitutional issue alone, but last week sent it back to Robinson with instructions that he try to settle it on other than constitutional grounds.

Robinson has conducted subsequent proceedings under seal.

In his response, filed late Wednesday, Walsh made one direct mention of North, stating that if the applications for opening the proceedings are granted, both his office and North's lawyers could secretly designate whatever portions they feel should be kept under seal.