Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OBJECT STRUCTURE:
- my_data:
- > {
- > > "events":
- > > > [
- > > > > {
- > > > > > "name": "Berlin festival",
- > > > > > "date": 17/05
- > > > > > "description": "Music festival",
- > > > > > "artists":
- > > > > > > [
- > > > > > > > {
- > > > > > > > > "name": "Mark L."
- > > > > > > > > "genre": "Pop"
- > > > > > > > },
- > > > > > > > {
- > > > > > > > > "name": "Andrew F."
- > > > > > > > > "genre": "Rap"
- > > > > > > > },
- > > > > > > ]
- > > > > }
- > > > ],
- > > > [
- > > > > ...
- > > > ]
- > }
- __________
- METHOD:
- bot.send_message(..., text="".join([f"<b>Event: {e['description']}</b>\n Event date: {e['Date']}\n\n⭕ {e['#names']}" for e in my_data['events']])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement