Learn a bash script today and see that there is a: bin= ' dirname '(dirname filename is the directory where the file is exported, and $ is the file name of the bash file, which is generally used in bash to enter the directory where the script is
(1) What is the difference between single and double quotation marks?1, can be used to escape the range, the single quotation mark can only escape the single quotation mark \ ', double quotation marks except single quotation mark cannot escape,
PHP single double quote difference, PHP double quote Difference
in PHP, the definition of a string can use single quotation marks ' ' in English , you can also use double quotes " " in English .
However, you must use the same single or double
Today in the online crawler, it is strange to find that Python string can be used both double quotation marks and single quotation marks, so on the internet Baidu for a reason.It turns out that there may be both double and single quotes in the
(1) What is the difference between single and double quotation marks?
1, can be used to escape the range, the single quotation mark can only escape the single quotation mark \ ', double quotation marks except single quotation mark cannot escape,
All strings printed in Python are enclosed in quotation marks. This is because when Python prints the value, it keeps the value in the Python code state, not the state you want the user to see, and if you use the print statement, the result is
When the shell script executes, the shell interprets the lines in the script and executes them;For some specially processed sentences, we can use quotation marks or backslashes to prevent the shell from interpreting the execution.As below, when you
This is consistent with the result obtained by converting (back-quote. As a common function, this operation may be useful in some cases. For most types, this function returns a string. when it is passed to eval (), the same object is
Python built-in functions--repr & STR
Repr & Str
Repr (object) & Str (object)
Repr (object) returns a printable string representing the object. This is consistent with the results that are processed by conversion (anti-quote "). as a normal
1>>> s ='Hello, world.'2>>>Str (s)3 'Hello, world.'4>>>repr (s)5 "' Hello, world. '"6>>> Str (1.0/7.0)7 '0.142857142857'8>>> repr (1.0/7.0)9 '0.14285714285714285'Ten>>> x = 10 * 3.25 One>>> y = 200 * 200 A>>> s ='The value of x is'+ repr (x) +', and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.