Hey, I'm new here. Could someone help me with my project?

Hello! I was trying to make a text adventure game and I couldn’t figure out why it doesn’t work, how to fix it?

Here is my code

player = input("Name: ")
Help = "NO CAPS    l=look    n=north   s=south     e=east    w=west    take (item)    l (item)    use (item)"
sect1 = ["l", "n", "s", "l door"]
sect2 = ["l", "e", "s", "l shelf"]
sect3 = ["l", "n", "s", "e", "w", "l shovel", "l flower", "l gate", "l streets", "take shovel"]
dis1 = "There is an door facing your north, behind you is an small garden"
dis2 = "Fortunately the door isn't locked, you opened it. Facing north is a shelf, go south if you want to exit this building, you can go east."
dis3 = "You are in a small garden, you can see some flowers. There is a shovel beside you. You can go north. Continue south out of the wooden gate to enter the streets, east to proceed further into the garden. You can go west."
Csect = sect1

print("Hello "+player+"!")
print("Welcome to the land of Adventures!")
print(" ")
print("Type Help if you are stuck.")
print(" ")
print("-Home-")
print('')

while Csect == sect1:
    Ans = input("/")

    if Ans == "help":
        print(Help)

    elif Ans in sect1:

        if Ans == "l" or "look":
            print(dis1)

        elif Ans == "n":
            Csect = sect2
            print(dis2)

        else:
            Csect = sect3
            print(dis3)

    else:
        print("Sorry, I don't recognize this command.")
        pass

This is what happens when I run it. Everything else seem to work fine

Name: Python
Hello Python!

Welcome to the land of Adventures!
 
Type Help if you are stuck.
 
-Home-

/n
There is an door facing your north, behind you is an small garden
/s
There is an door facing your north, behind you is an small garden
/l
There is an door facing your north, behind you is an small garden
/

I am using PyCharm CE

The above is parsed as:

if (Ans == "l") or ("look"):

Since non-empty strings (like “look”) are always true, the if statement is always found to be true. You probably want something similar to:

if Ans == "l" or Ans == "look": # or...
if Ans in ("l", "look"):

Ohh! Thanks a lot! It works now! :smiley: