python&tensorflow&pytorch

tuple 내부의 값은 바꿀 수 없다.

tomato13 2011. 1. 19. 19:48

tuple 내부의 값은 바꿀 수 없다.


ex)

def test13():

a = (1, 2, 3)

a[1] = 2


=> 

TypeError: 'tuple' object does not support item assignment

'python&tensorflow&pytorch' 카테고리의 다른 글

zip   (0) 2019.07.17
collections.Counter()  (0) 2019.07.17
for loop  (0) 2011.01.19
global variable  (0) 2011.01.19
string comparison  (0) 2011.01.18