Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 361 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bs4 to List/Dictionary Question

#1
This is my current code:


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Everything prints out correctly in the output as I need but I want to be able to pull one at a time from it instead of all 15 at once. So how can I change

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

to output a dictionary or list instead .. thanks
Reply

#2
Declare a list,

some_list = []

And inside for loop,

some_list.append(a.text)

Or

Declare a dict,
some_dict = {}

And inside for loop,
some_dict[some_key value] = a.text
Reply

#3
Quote:(08-07-2020, 11:18 AM)sefefew Wrote:

[To see links please register here]

Declare a list,

some_list = []

And inside for loop,

some_list.append(a.text)

Or

Declare a dict,
some_dict = {}

And inside for loop,
some_dict[some_key value] = a.text

Exactly what I was looking for thanks
Reply

#4
Quote:(08-07-2020, 10:46 PM)mudrig Wrote:

[To see links please register here]

Quote: (08-07-2020, 11:18 AM)sefefew Wrote:

[To see links please register here]

Declare a list,

some_list = []

And inside for loop,

some_list.append(a.text)

Or

Declare a dict,
some_dict = {}

And inside for loop,
some_dict[some_key value] = a.text

Exactly what I was looking for thanks
Happy coding
Reply

#5
It is not easier to buy a dictionary with the language you need, that is, it already depends on the purpose of each one. For example, I wanted to learn as many [link redacted] as possible, and I bought a dictionary from Amazon with the specifics of the terms. You can also find dictionaries with grammar or phrases. But what is the purpose of this whole thing? I can't understand, so could you please explain to me, because I find the scheme quite interesting. It wouldn't hurt to delve deeper into other areas, but it's personal development.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through