Share s python string 写出下列操作的输出结果

toquyendisney1

New member

`` `Python
>>> a = "Hello World"
>>> A [0]
'H'
>>> A [1: 5]
'Ello wo'
>>> A [-1]
'D'
>>> A [-2:]
'ld'
>>> A [:: 2]
'Hlowrld'
>>> A [1 :: 2]
'Ellod'
`` `

## 5 hashtags

* #Python
* #sợi dây
* #Programming
* #tutorial
* #mã số
=======================================

```python
>>> a = "hello world"
>>> a[0]
'h'
>>> a[1:5]
'ello wo'
>>> a[-1]
'd'
>>> a[-2:]
'ld'
>>> a[::2]
'hlowrld'
>>> a[1::2]
'ellod'
```

## 5 Hashtags

* #Python
* #String
* #Programming
* #tutorial
* #Code
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top