79503508

Date: 2025-03-12 12:01:29
Score: 0.5
Natty:
Report link

An alternative

  1. Return a list from the function.

  2. Use the function as an iterable in a for

def pets():
    pets_list = ['dog','cat']
    return pets_list


for i in pets():
    print(f'I love my {i}')
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Candid Moe