Both sentences are grammatically correct, but they convey slightly different meanings due to the presence or absence of the article "a."
- "He was a doctor and a teacher."
- "He was a doctor and teacher."
In the first sentence, "He was a doctor and a teacher," the article "a" is used before both "doctor" and "teacher." This indicates that he held both professions as separate and distinct roles. Essentially, he was both a doctor and a teacher, implying that these were two different identities or occupations that he had.
In the second sentence, "He was a doctor and teacher," the article "a" is only used before "doctor" and not before "teacher." This construction suggests that being a doctor and being a teacher were combined or seen as a single role or identity. In this case, the professions of doctor and teacher are not necessarily distinct but are considered together as part of a single identity or occupation.
So, the choice between the two sentences depends on whether you want to emphasize that the person held two distinct roles (using "a doctor and a teacher") or that the person combined two roles into one identity (using "a doctor and teacher"). Both are grammatically correct; the difference lies in the nuance of meaning conveyed.