Yes, for the most part it is safe to substitute a TV power cord with a generic 2 prong AC power cord as long as the replacement has correct connectors (C7 for most TVs), supports the TV’s voltage and current requirements, and is UL listed or equivalent in terms of safety. Check manufacturer recommendations for compatibility and safety every time.