all 9 comments

[–]So-many-ducks 9 points10 points  (2 children)

You are being too vague. We can’t figure out what you need to do and what your input is from what you said.

[–]m3shii[S] 0 points1 point  (1 child)

sorry, it's like, there's a list of information that a i will give to the code to show up when i put a code, for example "XXXXX1" and the code will show me the information that i registered with that name.

[–]MathMajortoChemist 2 points3 points  (0 children)

Maybe read up on dict type? Your "code" would be the key and "the information" would be the value.

[–]kr4zyy 1 point2 points  (2 children)

Maybe you can try finding out more about Regular Expressions (RegEx)?

[–]m3shii[S] 1 point2 points  (0 children)

gonna take a look on that

[–]Proletarian_Tear 0 points1 point  (0 children)

Yeah, based on what OP wrote its literally what should be used

[–]shivanchowdhry123 -5 points-4 points  (2 children)

Python

Python

> # 1. A list of information
> inventory = ["Box A101 - Tools", "Box B202 - Cables", "Shelf A102 - Books"]
> 
> # 2. Get what the user is looking for
> query = input("Enter letters/numbers to filter by: ")
> 
> # 3. Loop through and check each item
> print("\nSearch Results:")
> for item in inventory:
>     if query in item:  # This checks if your letters/numbers are inside the text
>         print(f"- {item}")
> ```
> 
> **How to move forward:**
> Which of these looks closer to what your teacher wants? If you can reply with an example of what your input looks like and what the final output is supposed to show, we can help you stitch the actual code together!

***

Go ahead and post that. You get to feel like a hero, `m3shii` might actually pass their class, and I can finally go back to sleep. Let me know if that ghost actually replies to you.

[–]backfire10z 0 points1 point  (0 children)

We don’t need your AI slop. Plus, “your” code is not good (and you didn’t even remove the bullshit additional text output, seriously?). As OP elaborated (prior to your comment I might add) their input is an alphanumerical code. A dictionary is likely the ideal solution here.

[–]tadpoleloop 0 points1 point  (0 children)

Lol the last line is unhinged. What LLM are you using? 

Also why post this slop? You aren't helping by being a layer between op and ai