Forwarded from Nematillo Ochilov
list = ['', 'help', '', 'hello']
i="''"
for i in list:
if i:
list.remove('')
print list
Forwarded from Anvar Jamgirov 🇵🇸
mas=['', 'help', '', 'hello', 'Admin, [09.08.17 10:33]', 'salom','Admin, [09.08.17 11:33]']
for i in mas:
if str(i).startswith("Admin"):
mas.remove(i)
print(mas)
for i in mas:
if str(i).startswith("Admin"):
mas.remove(i)
print(mas)
Forwarded from Deleted Account
Result:
['', 'help', '', 'hello', 'salom']
Forwarded from Kripton
men alohida metodni maqul ko'rdim chunki unda agar dostup berilmagan bo'lsa oshibka beradi, getChatda esa admin bo'lmasa ham admin bo'lib dostup berilmagan bo'lsa ham bir hil obyekt qaytaradi.
Forwarded from Nematillo Ochilov
[{"ok":false,"error_code":403,"description":"Forbidden: bot can't initiate conversation with a user"}]
bu owibkani qanday hal qilsa boladi?Forwarded from Kripton
Forwarded from Kripton
ha setWebhook qilavering, hamma smslar o'chirildi
Forwarded from Future Dreams
js = {"king" : 612}
js['king'] = 777
print(js)
js['king'] = 777
print(js)
>>> '1' in '123' # Works!
True
>>>
>>> [] in '123'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'in <string>' requires string as left operand, not list
>>>
>>> 1.0 in '123'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'in <string>' requires string as left operand, not float
>>>
>>> {} in '123'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'in <string>' requires string as left operand, not dict
Forwarded from Типичный программист
Учимся создавать мобильные приложения на Python: https://goo.gl/4aosyr