Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:56:10+00:00 2026-06-13T16:56:10+00:00

Possible Duplicate: Inconsistency in python help(‘string’) versus help(list)? In the interactive shell of Python,

  • 0

Possible Duplicate:
Inconsistency in python help(‘string’) versus help(list)?

In the interactive shell of Python, if I type help(42) I get all the information about int objects. If I type help("") I get nothing and if I type help("x") I get “no Python documentation found for ‘x'”.

I know I can type help(str), but I’d like to understand why are the other two working differently from help(42)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:56:11+00:00Added an answer on June 13, 2026 at 4:56 pm

    See the documentation on the help function:

    If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated.

    In other words, when help is given a class or type, it returns help on that class or type.

    class C: pass
    help(C)
    

    When help is given any instance other than a string, like help(1), it provides documentation on the type of that variable (int, float, or a defined class).

    help(1)
    help(C())
    

    When it is given a string, it provides documentation on the type or class that that string refers to. If you want help with the str class itself, you can do:

    help(str)
    

    or

    help("str")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Get the size of a list in python? I need to be
Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: PHP get all arguments as array? Within a javascript function arguments always
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: get current latitude and longitude from gps enabled device I use the
Possible Duplicate: How do you get the footer to stay at the bottom of
Possible Duplicate: std::string and its automatic memory resizing I am just curious, how are
Possible Duplicate: regex for URL including query string I have a text or message.
Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle?
Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument Consider the following function:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.