Advertisement
here2share

# b_func_hack.py

Oct 17th, 2021
1,352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. # b_func_hack.py
  2.  
  3. def set_pets(vars=None, refs=locals()):
  4.     if vars:
  5.         if '[' in str(vars):
  6.             for var in vars:
  7.                 i = len(refs)-6
  8.                 refs['pet_0%s' % i] = var
  9.         else:
  10.             i = len(refs)-6
  11.             refs['pet_0%s' % i] = vars
  12.         try:
  13.             print pet_09
  14.         except:
  15.             0
  16.         try:
  17.             print pet_08
  18.         except:
  19.             0
  20.         try:
  21.             print pet_07
  22.         except:
  23.             0
  24.         try:
  25.             print pet_06
  26.         except:
  27.             0
  28.         try:
  29.             print pet_05
  30.         except:
  31.             0
  32.         for z in (pet_04, pet_03, pet_02, pet_01, pet_00):
  33.             print z
  34.         print
  35. 0
  36. set_pets(['dog', 'cat', 'fish', 'fox', 'monkey'])
  37. set_pets(('bird'))
  38. set_pets(('PYTHON !!!'))
  39. print refs
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement