Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def filtr_genre(list):
- genre=input()
- list_genre=[]
- for song in list:
- if song[1]==genre:
- list_genre.append(song)
- print(list_genre)
- return list_genre
- #funkcni fce pro filtrovani pisnicek
- #returnuje seznam jiz se stejnym zanrem
- #nefunkcni pro "anything"
- def filtr_mood(list_genre):
- mood=input()
- list_genre_mood=[]
- for song1 in list_genre:
- if song1[2]==mood:
- list_genre_mood().append(song1)
- print(list_genre_mood)
- list=[["a","rock","happy","60.leta"],["b","rock","happy","60.leta"]]
- list_genre=[]
- list_genre_mood=[]
- filtr_genre(list)
- filtr_mood(list_genre)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement