关于Python中去掉\n之类的符号的问题

找了好久才想到可以用strip,

port = port.strip()

此时就可以解决\n的问题了

猜你喜欢

转载自blog.csdn.net/yehuaner33/article/details/81229714