Is it safe to use a flexible duct near the end of an 18ft dryer exhaust run?
The drier installation instructions should typically have venting parameters that should be followed. That being said, rigid duct will always flow more air than corrugated flexible aluminum tubing. 4” aluminum flexible tubing flows approximately the same air as 3” hard pipe. All of the little ridges slow down air flow significantly. While a few feet of flexible tubing will probably not drastically reduce air flow I would always avoid it if at all possible. The less resistance the faster your cloths will dry.