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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:43:20+00:00 2026-06-17T23:43:20+00:00

Please can anyone tell me how to get the following output in python: 9.4605e+12

  • 0

Please can anyone tell me how to get the following output in python:

9.4605e+12

I typed it that way

S_L = "2.998765e+08" 
print "S_L"

But it did not work

  • 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-17T23:43:21+00:00Added an answer on June 17, 2026 at 11:43 pm

    You can get print a number with exponent notation by using string formatting:

    >>> my_num = 123456.7890
    >>> print my_num
    123456.789
    >>> print '{0:e}'.format(my_num)
    1.234568e+05
    

    And in your case above, you are probably getting S_L as the output because you have quotes around S_L, which means it is getting interpreted as a string and not the contents of the S_L variable. In that specific case, you could do:

    >>> S_L = "2.998765e+08"
    >>> print S_L
    2.998765e+08
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code : if request.session.get(name,False): Can anyone please tell me
Can anyone please tell me why I get the following error when I try
Can anyone please tell me how I can write a bash shell script that
Hi can anyone please tell me why the following code is only returning the
please can anyone tell me the error ! i get error in the line
Can anyone tell me that How to get tag of a UIButton when i
can any one please tell me how to get the Google places api key
please can anyone tell me how to validate a text box while iam moving
I need to update jquery1.3.2 to jquery1.4 (in Asp.net MVC). Please can anyone tell
Can anyone please tell/suggest me how can i store and retrieve comments multiple/different values

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.