Inconsistency in python help('string') versus help(list)?

后端 未结 5 746
旧时难觅i
旧时难觅i 2021-01-25 05:58

When I type help(\'string\') in the python interpreter I get information about the string class. There,upper() is indicated as a function. Yet I can on

5条回答
  •  离开以前
    2021-01-25 06:26

    This is because 'string' is a string. So is 'list'

    To get a similar result for lists, try help([])

提交回复
热议问题