physicist_names = [‘einstein’,‘newton’,‘hawking’]
show_physicist(physicist_names)
AttributeError:‘list’ object has no attritube title
修改后的代码
def show_physicist(names_list):
print(str(names_list).title())
title不能用于列表def show physicist names list print names list title physicist names einstein newton hawking show physicist physicist names AttributeErr list object has no attritube title
physicist_names = [‘einstein’,‘newton’,‘hawking’]
show_physicist(physicist_names)
AttributeError:‘list’ object has no attritube title
修改后的代码
def show_physicist(names_list):
print(str(names_list).title())
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/131830.html