word_ascii = [] word = str(input("輸入文字")) for i in word: ascii_transform = ord(i) print(ascii_transform ) word_ascii.append(ascii_transform) print(word_ascii)
出處
https://www.tinycorner.tw/2018/10/08/%E5%88%A9%E7%94%A8-python-%E5%81%9A-ascii-%E8%BD%89%E6%8F%9B/
沒有留言:
張貼留言