How to make python print a list based on input?

I want to make python print a list selected by the user. I’m not sure what I’m doing wrong. Also I’m sorry if my code is formatted weirdly, I just started learning python. Thanks!

Each trail has a list with its current condition. So each list has the Trail’s name, its overall condition, if its wet, has leaves on it, etc.

Below is my code

status = ["Trail", "Overall Status?", "Wet?", "Leaves?", "Fallen Tree?", "Overgrown?"]
#All of the conditions types for a trail
trailList = ["Bluff View", "Zombie West"]
#All of the trails in the program. All of the lists in the program

#below are the lists for each trail with conditions
bluffView = ["Bluff View", "Minor Issue", "Dry", "No Leaves", "Fallen Tree", "Not Overgrown"]
zombieWest = ["Zombie West", "All Clear", "Dry", "Leaves", "No Downed Trees", "Not Overgrown"]

import time
print("Trail List:",trailList)
time.sleep(1)
Trail = input("Open which trail?")
print(status)
print(Trail)

You can use a dictionary that uses the trail names as keys and the list as its value.

all_trails = {
      'trail1: ['list', 'of', 'items'],
      'trail2: ['more', 'items'],
      }

details = all_tails[tail_name]

Not sure if this is what you have in mind, but this is one way to do it:

trailList = {
    "Bluff View": [
        "Minor Issue",
        "Dry",
        "No Leaves",
        "Fallen Tree",
        "Not Overgrown"
    ],
    "Zombie West": [
        "All Clear",
        "Dry",
        "Leaves",
        "No Downed Trees",
        "Not Overgrown"
    ]
}

print("Trail List:")
for key in trailList:
    print(key)
print()
Trail = input("Open which trail? ")
for status in trailList[Trail]:
    print(status)
1 Like

That is what I had in mind, but I was going to leave the OP to put the hint to work.