Join elements of list with various conditions
Join elements of list with various conditions Question: For this list pays_list=["France","francais","€200", "1kg","20€","Espagne","espagnol","€20", "Allemagne","allemand","deutsch","€100","2kg", "300€", "Belgique","belge","frite","€30"] pays_concatenate=[] for i, elm in enumerate(pays_list): if "€" in elm: del pays_list[i] pays_list=pays_list for i in pays_list: for e in i: if any(e in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" for e in i): print(i) "i" will be equal to elements with a capital …