Advertisement
here2share

# del_list.py

Jan 27th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. # del_list.py
  2.    
  3. def x(ii='', l=[]):
  4.     if ii is not '':
  5.         try:
  6.             for i in ii:
  7.                 l.append(i)
  8.         except:
  9.             l.append(ii)
  10.     else:
  11.         del l[:]
  12.     return l
  13.  
  14. print x(1)
  15. print x(2)
  16. print x()
  17. print x(9)
  18. print x([99,3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement