How to convert list of characters to list of ASCII values in Python

1 Answer

0 votes
lst = ['a', 'b', 'c', 'd', 'e', 'f']

lst = [ord(ch) for ch in lst]

print(lst)




'''
run:

[set(), {1, 3, 7}, set(), {9, 2, 6}, set()]

'''

 



answered Mar 16, 2023 by avibootz
...