ord() expected string of length 1, but int found

2019-10-22 11:42栏目:王中王今日开奖结果
TAG:

源代码是这么:

s=b'^SdVkT#S ]`Y\!^)x8fx80ism'
key=''
for i in s:
     i=ord(i)-16
     key+=chr(i^32)
print (key)

运维后边世了难题:ord() expected string of length 1, but int found

之所以出现这么些题材,是在字符串调换进度中冒出了三个小错误,在一整齐百度和Google后,发掘概念仍然很迷糊,可是在曙光大佬的解答后,驾驭了怎么管理,正是在s后加””,运营后意识完美消除

版权声明:本文由493333王中王开奖结果发布于王中王今日开奖结果,转载请注明出处:ord() expected string of length 1, but int found