['New York', 'TRUE', 'Thimphu', 'FALSE', 'Tokyo', 'FALSE', 'Japan', 'FALSE', 'India', 'FALSE']
This is my list, I want to generate new list from it but a new list should have TRUE and New York move together whenever a new list is generated, index doesn't matter but 'New York', 'TRUE', should be adjacent to one another.for eg: following can be a new list:
[ 'Thimphu', 'FALSE', 'New York', 'TRUE','Tokyo', 'FALSE', 'Japan', 'FALSE', 'India', 'FALSE']
[ 'Thimphu', 'FALSE','Tokyo', 'FALSE', 'Japan', 'FALSE', 'India', 'FALSE' 'New York', 'TRUE',]
Aucun commentaire:
Enregistrer un commentaire