vendredi 19 novembre 2021

How to print list of tuples? [closed]

I have a list of tuples like this:

[('person1.country', 1.0), ('people.country', 1.0)]
[('person1.Favourite-movie', 0.7), ('movie.title', 0.3)]
[('person1.country', 0.2), ('people.country', 0.5)]
[('person1.Favourite-movie', 0.4), ('movie.title', 0.6)]

I need to print the result like this:

 [('person1.country','people.country']

merge the two tuples if the number above 0.9

Aucun commentaire:

Enregistrer un commentaire