Functions and conditionals
Good day everyone, I`m new at programming and more so in Python, though i presume to have grasped the basic concept of it all, I`m stuck in a predicament though i feel as though it has a very simple solution. Here`s my code: def str_length(mystring) count = mystring return len (count) mystring = input("write what you will: ") # if mystring > 5: # print (str_length(mystring)), "greater than 5") #elif mystring == 5: print (str_length(mystring)), "equal to 5") #else: print (str_length(mystring)), "less than 5) PROBLEM: I`ve tried all possibilities known to me so far, and I keep getting all kinds of erros, because my goal is to count the characters on a string and the number be compared to the "int" 5, i get that, that`s impossible, and I`ve tried all sorts of conversions and the code still doesn`t work, so how can i make this code work?? Any help would be greatly appreciated. Thank you