summaryrefslogtreecommitdiff
path: root/doc/data/messages/c/consider-using-join/bad.py
blob: c77b6f767be3ad2df3802ede6540942ec43e2aed (plain)
1
2
3
4
5
6
7
def fruits_to_string(fruits):
    formatted_fruit = ""
    for fruit in fruits:
        formatted_fruit += fruit  # [consider-using-join]
    return formatted_fruit

print(fruits_to_string(["apple", "pear", "peach"]))