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 7748621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:49:57+00:00 2026-06-01T10:49:57+00:00

type(3,) returns the int type, while t = 3, type(t) returns the tuple type.

  • 0

type(3,) returns the int type, while

t = 3,
type(t)

returns the tuple type.
Why?

  • 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-01T10:49:58+00:00Added an answer on June 1, 2026 at 10:49 am

    Inside the parentheses that form the function call operator, the comma is not for building tuples, but for separating arguments. Thus, type(3, ) is equivalent to type(3). An additional comma at the end of the argument list is allowed by the grammar. You need an extra pair of parens to build a tuple:

    >>> def f(x):
    ...     print x
    ... 
    >>> f(3)
    3
    >>> f(3,)
    3
    >>> f((3,))
    (3,)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had encountered strange problem while construct a unordeed_set<tuple<int,int>> . I had tried VC++8,
i return such type IQueryable< IGrouping<int, Invoice>> List() how can i work with it?
The following returns Type of conditional expression cannot be determined because there is no
Type.GetType(System.String) Is there a lookup for the aliases available somewhere? Type.GetType(string) returns null .
I have the following Sql Query that returns the type of results that I
I have an activity which uses two Loaders. Each of them returns different type
GetType() returns null when the type exists in an unreferenced assembly. For example, when
when I type irb> require 'rubygems' it returns false. I have many gems in
When I type ctags -e it returns an error saying it doesn't know that
I created a class Foo that has the method toArray() that returns an Array<Int>

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.