【python】字符串问题

python 字符串问题nnnn在arcpy中版本为 python2.xn在QGIS中版本为 python2.x 或者 python3.xnpython2 和python3 之间的str处理方式经常会导致乱码,故出此文nnpython3版本nnnn# 将str或字节并始终返回strndef to_str(bytes_or_str):n if isinstance