Как это сделать программно?
if row == "" or not row == "":
print('the list is empty or not empty')
print(row)
Безопасно ли использовать API-сервис сторонних разработчиков для интеграции с WhatsApp?
class A:
def __init__(self, name='default'):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self._name = value
a = A()
print(a.name)
a.name = 'test'
In [1]: l1 = list(range(5))
In [2]: l2 = list(range(5, 10))
In [3]: l1
Out[3]: [0, 1, 2, 3, 4]
In [4]: l2
Out[4]: [5, 6, 7, 8, 9]
In [5]: list(zip(l1, l2[1:] + [None]))
Out[5]: [(0, 6), (1, 7), (2, 8), (3, 9), (4, None)]
In [6]: list(map(lambda x, y: (x, y), l1, l2[1:] + [None] ))
Out[6]: [(0, 6), (1, 7), (2, 8), (3, 9), (4, None)]
In [7]: def foo(x, y):
....: return '%s:::%s' % (x, y)
....:
In [8]: list(map(foo, l1, l2[1:] + [None] ))
Out[8]: ['0:::6', '1:::7', '2:::8', '3:::9', '4:::None']