所以我的问题是:
a = "01000001"
b = "01000010"
c = "01000011"
# and so on...
code1 = "hello"
read1 = 0
list1 = []
while(read1 < len(code1)) :
list1.append(code1[read1])
read1 = read1 + 1
output1 = 0
while(output1 < len(list1)) :
print(list1[output1], end="")
output1 = output1 + 1
它将只打印出>>>hello
我怎样才能让python打印出字符串而不是名称,从而得到:
0100100001000101010001010100010101001111
将字符串转换为二进制的简单方法
相关问题 更多 >
编程相关推荐