forked from tdwojak/Python2017
31 lines
366 B
Python
31 lines
366 B
Python
lista = [1, 2, 3]
|
|
|
|
a=id(lista)
|
|
b=id(lista)
|
|
|
|
if a == b:
|
|
print('Lista Immutable')
|
|
else:
|
|
print('Lista Mutable')
|
|
|
|
napis = 'Napis'
|
|
|
|
c=id(napis)
|
|
d=id(napis)
|
|
|
|
if c == d:
|
|
print('Napis Immutable')
|
|
else:
|
|
print('Napis Mutable')
|
|
|
|
liczba=23.34
|
|
|
|
e=id(liczba)
|
|
f=id(liczba)
|
|
|
|
if e == f:
|
|
print('Liczba Immutable')
|
|
else:
|
|
print('Liczba Mutable')
|
|
|
|
print('Koniec') |