“Python ord ()” Kode Jawaban

apa fungsi ord pada python

# Convert ASCII Unicode Character 'A' to 65
y = ord('A')
print(type(y), y)
 
alphabet_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
# Print 65-90
for i in alphabet_list:
    print(ord(i), end = " , ")
Troubled Trout

Python ord ()

print('Unicode value of lower case alphabet a is ', ord('a')) # lower case alphabet 
print('Unicode value of bumber 5 is ', ord('5')) # Number
print('Unicode value of symobol $ is ', ord('$')) # dollar
print('Unicode value of upper case alphabet A is ', ord('A')) # Upper case alphabet
print('Unicode value of zero is ', ord('0')) # Number Zero
Gorgeous Gazelle

Jawaban yang mirip dengan “Python ord ()”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya