How to Solve Python ShapeFile.writer Error for Beginners

Python Learning Record
shapefile.Writer error
Writer(r.shapeType) error when using shapefile.
Exception: The target filepath 5 must be of type str/unicode, not <class ‘int’>.
Solution:
w=shapefile.Writer(str(r.shapeType))

Read More: