I wrote this function to check if a word is abecedarian but I can't seem to use a string as an argument. I didn't know this since I've never had to use a string argument until now. Is there a way around this?
def is_abecedarian(word):
prev_char_ord = 0
for char in word.lower():
if prev_char_ord <= ord(char):
prev_char_ord = ord(char)
else:
return False
return True