Convert single backtick code sections to triple backtick code sections for Arabic Guide articles (13 of 15) (#36240)
* fix: converted single to triple backticks13 * fix: added prefix Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: removed language in wrong place Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: add language postfix Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: removed language in wrong place Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@@ -18,58 +18,68 @@ localeTitle: طريقة تقسيم السلسلة
|
||||
|
||||
1) سلسلة الانقسام في الفضاء: ""
|
||||
|
||||
`string = "freeCodeCamp is fun."
|
||||
print(string.split(" "))
|
||||
`
|
||||
```python
|
||||
string = "freeCodeCamp is fun."
|
||||
print(string.split(" "))
|
||||
```
|
||||
|
||||
انتاج:
|
||||
|
||||
`['freeCodeCamp', 'is', 'fun.']
|
||||
`
|
||||
```python
|
||||
['freeCodeCamp', 'is', 'fun.']
|
||||
```
|
||||
|
||||
2) سلسلة الانقسام في الفاصلة: "،"
|
||||
|
||||
`string = "freeCodeCamp,is fun, and informative"
|
||||
print(string.split(","))
|
||||
`
|
||||
```python
|
||||
string = "freeCodeCamp,is fun, and informative"
|
||||
print(string.split(","))
|
||||
```
|
||||
|
||||
انتاج:
|
||||
|
||||
`['freeCodeCamp', 'is fun', ' and informative']
|
||||
`
|
||||
```python
|
||||
['freeCodeCamp', 'is fun', ' and informative']
|
||||
```
|
||||
|
||||
3) لا يوجد `separator` محدد
|
||||
|
||||
`string = "freeCodeCamp is fun and informative"
|
||||
print(string.split())
|
||||
`
|
||||
```python
|
||||
string = "freeCodeCamp is fun and informative"
|
||||
print(string.split())
|
||||
```
|
||||
|
||||
انتاج:
|
||||
|
||||
`['freeCodeCamp', 'is', 'fun', 'and', 'informative']
|
||||
`
|
||||
```python
|
||||
['freeCodeCamp', 'is', 'fun', 'and', 'informative']
|
||||
```
|
||||
|
||||
ملاحظة: إذا لم يتم تحديد `separator` ، فسيتم تجريد السلسلة من **جميع** المسافات البيضاء
|
||||
|
||||
`string = "freeCodeCamp is fun and informative"
|
||||
print(string.split())
|
||||
`
|
||||
```python
|
||||
string = "freeCodeCamp is fun and informative"
|
||||
print(string.split())
|
||||
```
|
||||
|
||||
انتاج:
|
||||
|
||||
`['freeCodeCamp', 'is', 'fun', 'and', 'informative']
|
||||
`
|
||||
```python
|
||||
['freeCodeCamp', 'is', 'fun', 'and', 'informative']
|
||||
```
|
||||
|
||||
3) تقسيم السلسلة باستخدام `maxsplit` . هنا نقسم السلسلة على "" مرتين:
|
||||
|
||||
`string = "freeCodeCamp is fun and informative"
|
||||
print(string.split(" ", 2))
|
||||
`
|
||||
```python
|
||||
string = "freeCodeCamp is fun and informative"
|
||||
print(string.split(" ", 2))
|
||||
```
|
||||
|
||||
انتاج:
|
||||
|
||||
`['freeCodeCamp', 'is', 'fun and informative']
|
||||
`
|
||||
```python
|
||||
['freeCodeCamp', 'is', 'fun and informative']
|
||||
```
|
||||
|
||||
#### معلومات اكثر
|
||||
|
||||
|
||||
Reference in New Issue
Block a user