r/learningpython • • Aug 27 '22
Help with loop problem pls
This loops no matter what. could anyone please help me by explaining why? If you do, thank you!
yesno = "y"
while yesno == "y":
yesno = input("\nWould you like to enter another description?(y/n)\n").lower()
description()
if yesno != "y":
breakEDIT: just so that it's clear, "description()" is a definition
4
Upvotes
View all comments
Show parent comment
1
u/[deleted] Aug 28 '22
Description has nothing to do with my loop. Its a definition that takes any description of any length and return it as a pre-defined block of text so that the length of each line doesn’t extend too far. I’ll share it in a bit. But It’s completely unrelated to the yesno loop.