summaryrefslogtreecommitdiff
path: root/doc/data/messages/c/consider-using-join/bad.py
blob: 5d5a32fb7875ad895aa8f05721b54aafd3ac24ae (plain)
1
2
3
4
5
6
7
8
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"]))