форкнуто от main/python-labs
Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
38 строки
1.1 KiB
Python
38 строки
1.1 KiB
Python
w=v=10
|
|
print(w>=v)
|
|
print(w==v)
|
|
print(w<=v)
|
|
print(w!=v)
|
|
print(w<v)
|
|
print(w>v)
|
|
print('\n')
|
|
|
|
mnoz1={'pen','book','pen','iPhone','table','book'}
|
|
print('book' in mnoz1)
|
|
print('cap' in mnoz1)
|
|
print('\n')
|
|
|
|
dic1={'Saratov':145, 'Orel':56, 'Vologda':45}
|
|
print('Vologda' in dic1)
|
|
print('Pskov' in dic1)
|
|
print(56 in dic1.values())
|
|
print('\n')
|
|
|
|
dct1={'Institut':['AVTI','IEE','IBB'],'Depart':['UII','PM','VMSS','MM'],'gruppa': ['A-01-15','A-02-15']}
|
|
print('UII' in dct1['Depart'])
|
|
print(dct1['Depart'][1] == 'MM')
|
|
print('\n')
|
|
|
|
a=17
|
|
b=-6
|
|
print((a>=b) and ('book' in mnoz1) and ('Pskov' not in dic1))
|
|
print((a % 2 == 1) and (b < 0) and (('Moscow' in dic1) or ('Pskov' not in dic1)))
|
|
print(not (a <= b) and (('pen' in mnoz1) or ('book' not in mnoz1)) and ('Kazan' not in dic1))
|
|
print((len(mnoz1) >= 3) and (a + b > 0) or (('Pskov' in dic1) and (dic1['Pskov'] > 50)))
|
|
print('\n')
|
|
|
|
w=v=10 #При таком присваивании переменные ссылаются на один и тот же объект в оперативной памяти
|
|
print(w is v)
|
|
w1=['A','B']
|
|
v1=['A','B']
|
|
print(w1 is v1) |