[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Lovepython015/Python/master/Article/PythonBasis/python6/4.md [Back]  [Original]

#  #



```python
# -*- coding: UTF-8 -*-
def chagne_number( b ):
    b = 1000

b = 1
chagne_number(b)
print( b )
```



```txt
1
```



 1  1000 

 `chagne_number`  b 



 Python 

** Python tuple  list  dict **



**** `a = 1` 1  a  1 `a = 1000`  1000 a  1  1000 1 

**** `a = [1,2,3,4,5,6]`  list list  6  a  list `a[2] = 5` list a , a  list 

![](http://upload-images.jianshu.io/upload_images/2136918-31b1031d75e1cec9?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)



**** c++  funa a  a  funa a  a 

**** c++   funa a  fun  a 

`b = 1`, 1  b  chagne_number  b  b  b 

```python
# -*- coding: UTF-8 -*-
def chagne_number( b ):
    print(' b {}' .format( b ) )
    b = 1000
    print(' b {}' .format( b ) )


b = 1
chagne_number( b )
print( ' b {}' .format( b )  )


```



```txt
 b 1
 b 1000
 b 1
```



```python
# -*- coding: UTF-8 -*-

def chagne_list( b ):
    print(' b {}' .format( b ) )
    b.append(1000)
    print(' b {}' .format( b ) )


b = [1,2,3,4,5]
chagne_list( b )
print( ' b {}' .format( b )  )
```



```txt
 b [1, 2, 3, 4, 5]
 b [1, 2, 3, 4, 5, 1000]
 b [1, 2, 3, 4, 5, 1000]
```



Web Proxy Viewer  |  New URL  |  Original Page