a guest Jun 24th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def function():
  2.     try:
  3.         #Если элемент уже есть ничего не делаем
  4.         a[43943]
  5.     except:
  6.         #Если нет, то вылетает исключение, здесь ловим его и устанавливаем значение '0'
  7.         a[43943] = 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand