forked from tdwojak/Python2017
Task01
This commit is contained in:
parent
ac794e117c
commit
a7441350a1
29
labs03/task01.py
Normal file
29
labs03/task01.py
Normal file
@ -0,0 +1,29 @@
|
||||
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')
|
Loading…
Reference in New Issue
Block a user