# Lesson22:List(4)授業練習用
###### tags: `Python`
## スライド練習1
:::info
code:
```python=
languages=["python","c++","java"]
print("before",languages)
languages.extend(["php","html"])
print("after",languages)
```
結果:
runfile('C:/Users/user/.spyder-py3/autosave/untitled30.py', wdir='C:/Users/user/.spyder-py3/autosave')
before ['python', 'c++', 'java']
after ['python', 'c++', 'java', 'php', 'html']
:::
## スライド練習2
:::info
code:
```python=
languages=["python","c++","java"]
print(languages)
languages.extend(["php","html"])
print(languages)
fruit=["banana","papaya","mango"]
print("before:",fruit)
fruit.append(["grapes","watermelon"])
print("after:",fruit)
```
結果:
['python', 'c++', 'java']
['python', 'c++', 'java', 'php', 'html']
before: ['banana', 'papaya', 'mango']
after: ['banana', 'papaya', 'mango', ['grapes', 'watermelon']]
:::
## スライド練習3
:::info
code:
```python=
```
結果:
:::
## スライド練習4
:::info
code:
```python=
```
結果:
:::
## スライド練習5
:::info
code:
```python=
```
結果:
:::
## スライド練習6
:::info
code:
```python=
```
結果:
:::
## スライド練習7
:::info
code:
```python=
```
結果:
:::
## スライド練習8
:::info
code:
```python=
```
結果:
:::
## スライド練習9
:::info
code:
```python=
```
結果:
:::
## スライド練習10
:::info
code:
```python=
```
結果:
:::