#🔒 Stuck with a list problem

8 messages · Page 1 of 1 (latest)

barren lagoon
#

I would be really grateful if someone can point out my mistakes. Shortly speaking, the sample input is:

2

2

[[Alice,Bob],[15,16],[aliceInsta,BobIsCool1],[@wonderland,@bobbyBoy],[1234567890,4078675309],[[email protected],[email protected]]]

Alice

Bob

2

[[Joe,Eve],[32,45],[AverageJoe,DropperOfEves],[@shoeless,@eve123],[8374629401,3849502837],[[email protected],[email protected]]]

Eve

Joe.

It is really confusing and i need to have an elegant output. The first line of the input should be a number of people for whom data is provided. Then a line with a data, and a third line which represents a number of lines equal to the number of people, with each line containing the name of one person.

two photos are oinned, here is the 3rd last part:

for _ in range(num_people):
    person = input().strip()
    data = people[person]
    print(f"Name: {person}")
    print(f"Age: {data['Age']}")
    print(f"Instagram: {data['Instagram']}")
    print(f"Twitter: {data['Twitter']}")
    print(f"Phone: {data['Phone']}")
    print(f"Email: {data['Email']}")
south shardBOT
#

@barren lagoon

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

south shardBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

dapper belfry
#

Also, what exactly is your question?

solemn quarry
#

@barren lagoon please post your code inline as text, see the !code insert above.

Please show example imput, again formatted as text.

Please show an example of your intended output.

south shardBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.