for i in names: k= f"See you again,{names[i].title()}" print(k)
时间: 2024-04-13 17:29:22 浏览: 61
coco.names 文件
The code you shared seems to be iterating over a list called `names` and printing a farewell message for each name. However, it seems to have a small error. Here's the corrected version:
```python
names = ["john", "mary", "jacob"]
for name in names:
k = f"See you again, {name.title()}"
print(k)
```
This code will print a farewell message for each name in the list `names`, where each name is capitalized using the `title()` method.
阅读全文