Oct-15-2018, 01:17 AM
(This post was last modified: Oct-15-2018, 01:57 AM by ichabod801.)
Hi, so I'm stuck on an assignment iterating words onto seperate lines and the code works when I just fill the variable with a string, but the second I put that string into an input, it just prints the input. Could someone possibly shed some light on why that happens?
Here's the code:
Thanks!
Here's the code:
quote = "quote goes here"
word = ""
for letter in quote:
if letter.isalpha():
word += letter
else:
if word > "":
print(word.upper())
word = ""
else:
word = ""
print(word.upper())And it works fine, but if I define quote with an input of the same string it just prints the string.Thanks!
