0

python

python كيف انشاء سلسلة تحتوي على اقتباس مزدوج. ب

12th Nov 2019, 10:22 PM
Mahmoud Essa
Mahmoud Essa - avatar
1 Answer
0
#To create a string with double quotes you can do # 1. use a different quoutes ( double quoted string inside single quoted string) >>> s = 'example "one"' >>> print(s) example "one" # 2. use escape-sequence. You can make a "shield" for double quotes # just add \ before double quote # ( you will receive \" which will be printed as ") >>> s = "example \"two\"" >>> print(s) example "two"
10th Jan 2023, 8:14 PM
Oleksandr Gorlinskyi
Oleksandr  Gorlinskyi - avatar