0
Hi guys, i just want to ask if how can i count the alphanumeric of a given string.
3 Answers
+ 5
Prepare the variable for storing number of alphanumeric, and initialize its value by zero.
Iterate through the string, check whether .isalnum() method returns true for the i-th character.
If <character>.isalnum() returns true, increment the alphanumeric counter variable.
+ 2
Ipang
Now that I see your answer, I understand the question.
đđ
+ 1
đ€·đ»ââïž
Are you trying to get the ordinals (numbers) of each letter in a string
txt = input()
print([ord(i) for i in txt])