Sep-13-2018, 03:48 PM
(This post was last modified: Sep-13-2018, 03:48 PM by gruntfutuk.)
(Sep-13-2018, 03:07 PM)Drone4four Wrote:counted_string is the length of the list (8), you need it to be the length of EACH string (word) as you go through the loop.mystring = "Secret agents are super good at staying hidden." mystring = mystring.split() counted_string = len(mystring) # int(counted_string) for word in mystring: if counted_string %2 == 0: print(word)
I am trying to help you, really, even if it doesn't always seem that way