Untitled

From Putrid Motmot, 10 Months ago, written in Plain Text, viewed 302 times.
URL http://codebin.org/view/6c94fcac Embed
Download Paste or View Raw
  1. from json import dumps
  2.  
  3. tracklist = [
  4.     {
  5.         'title': 'Stronger',
  6.         'artist': 'Saimoo',
  7.         'duration': 145,
  8.         'genre': 'Deep House',
  9.     },
  10.     {
  11.         'title': 'Alors On Danse',
  12.         'artist': 'Stromae',
  13.         'duration': 205,
  14.         'genre': 'Hip-Hop',
  15.     },
  16.     {
  17.         'title': 'Don\'t Be So Shy',
  18.         'artist': 'Imany (Filatov & Karas Remix)',
  19.         'duration': 190,
  20.         'genre': 'Deep House',
  21.     },
  22.     {
  23.         'title': 'Off My Mind',
  24.         'artist': 'Matvey Emerson',
  25.         'duration': 130,
  26.         'genre': 'Deep House',
  27.     },
  28.     {
  29.         'title': 'Now You\'re Gone',
  30.         'artist': 'Basshunter',
  31.         'duration': 154,
  32.         'genre': 'Eurodance',
  33.     },
  34.     {
  35.         'title': 'It Was A Good Day',
  36.         'artist': 'Ice Cube',
  37.         'duration': 260,
  38.         'genre': 'Hip-Hop',
  39.     },
  40.     {
  41.         'title': 'Diva',
  42.         'artist': 'Beyonce',
  43.         'duration': 200,
  44.         'genre': 'Hip-Hop',
  45.     }
  46. ]
  47.  
  48. deep_house_tracklist = []
  49. for track in tracklist:
  50.     if track['genre']  == 'Deep House':
  51.         deep_house_tracklist.append (track)
  52.  
  53. # напишите ваш код здесь
  54. for track in deep_house_tracklist:
  55.     print(dumps(track, indent=4))

Replies to Untitled rss

Title Name Language When
Re: Untitled Anorexic Bee text 8 Months ago.

Reply to "Untitled"

Here you can reply to the paste above