Coughing up yellowish-white sputum after taking medication for coughing may be associated with acute upper respiratory tract infections, acute bronchitis or pneumonia, and chronic lung diseases. 1. Acute upper respiratory tract infections, which are common diseases that can cause coughing, while usually caused by viral infections, can cause sputum to turn yellow. 2. Acute bronchitis or pneumonia, lung abscess, due to bacterial or viral infections affecting the mucous membrane of the trachea and bronchial tubes as well as lung tissues, causing acute bronchitis, pneumonia or lung abscess, resulting in an increase in the secretion of sputum and the yellow color of the sputum. 3. Chronic lung diseases, including chronic bronchitis, chronic obstructive pulmonary disease and bronchiectasis, etc., when combined with lung infections, yellow sputum may be coughed up. Specific causes need to be clarified after medical examination, and at the same time, according to the doctor’s instructions for medication.