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

后端 未结 5 912
旧时难觅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:31

    You mean to do help('str'), not help('string'). str is a type, string is a module providing functions for working with strings.

提交回复
热议问题