Good fine morning compatriots, I'm having some issues with a personal project. I'm writing a text-based murder mystery where the player reads different accounts and must guess who is the murderer. My issue arises with repeating navigation options. Here is a snippet of my current solution:
fbjn = input()
def testimonies(sub):
if sub == "Harb":
print_out(harbt)
print_out("\nWhose testimony would you like to hear? ")
fbjn = input()
testimonies(fbjn)
I'm wondering if there's an easier/less redundant way of coming back around to the beginning of a function and being able to repeat it until one wants to move on. Thanks in advance
SOLUTION: Figured out loops.
def testimonies():
while True:
sub = input()
if sub = "Harb":
print(harbt)
continue
Hardest thing was understanding scope regarding loops
Thanks for the help!