79365701

Date: 2025-01-17 18:01:52
Score: 1
Natty:
Report link

I use this notation

my_list = ["foo", "bar", "BAZ"]

replacements = {'BAZ': 'baz'}

my_list_updated: list = [
    replacements.get(col, col)
    for col in my_list
]
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: pink_daemon