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

  • Home
  • SEARCH
  • 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 9167131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:18:56+00:00 2026-06-17T15:18:56+00:00

I noticed this code: os.system(‘{0}’.format(path)) and saw that some one had change it to

  • 0

I noticed this code:

os.system("'{0}'".format(path))

and saw that some one had change it to this:

os.system("\"{0}\"".format(path))

I was wondering by changing it from single to double quotes what advantages does it give you?

Here is the original commit I pulled it from: https://github.com/mattn/legit/commit/84bd1b1796b749a7fb40e0b734d2de29ddc9d3d9

  • 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-17T15:18:57+00:00Added an answer on June 17, 2026 at 3:18 pm

    Not much really but rule of thumb use single quotes for literal assignments and prints. That way you will avoid printing things that shouldn’t be there in the first place.

    Single quotes are often useful because they are literal, and contain exactly the characters you type e.g. ‘Hi there/’ will actually print Hi there/

    However, if you need something like ‘Hi there /n’, if you put it in single quotes it will give you literally ‘Hi there /n’ whereas double quotes will give you the result you need “Hi there” and then break line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw this in some code: $(<p/>).append(<div>something</div>).appendTo(body); and noticed that it automatically closed the
I was playing around with some Javascript snippets today and noticed that this code
Stackoverflow has a nifty badge system. One thing I noticed is that badges are
In benchmarking some Java code on a Solaris SPARC box, I noticed that the
While looking at the source code of System.ServiceModel.Channels.BufferManager, I noticed this method: void TuneQuotas()
I have noticed in the code in my system that someone instantiated an anonymous
I noticed that when overriding the System.Windows.Window OnRender method fails to draw to the
While playing with VS11 beta I noticed something weird: this code couts f took
In my DllRegisterServer method of my COM dll, I previously had code that called
Here is a simple code of defining an array. I noticed this code will

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.