問題
ssh 到服務器 python xxx.py 時出現
UnicodeEncodeError: 'ascii' codec can't encode character in position 0: ordinal not in range(128)
解決方案
在 .zshrc 末尾添加:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
問題
ssh 到服務器 python xxx.py 時出現
UnicodeEncodeError: 'ascii' codec can't encode character in position 0: ordinal not in range(128)
解決方案
在 .zshrc 末尾添加:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo