daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Oct 21st, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. words = ({'hello2', 23, 23, 'mum', 'daddy1', 'father'})
  2.  
  3. wsr = set(words)
  4. print(wsr)
  5.  
  6.  
  7. # Кортеж -> Множества, Ошибка TypeError: unhashable type: 'set'
  8. def foo_four(*args):
  9.     """"""
  10.     #print((args), end=' '), print("- тип элемента: ", end=' '), print(type(args))
  11.     lots = set(args)
  12.     print((lots), end=' '), print("- тип элемента: ", end=' '), print(type(lots))
  13.  
  14. foo_four(words)
  15.  
  16.  
  17. # Кортеж -> Множества, работает
  18. def foo_four_one(x):
  19.     """"""
  20.     #print((args), end=' '), print("- тип элемента: ", end=' '), print(type(args))
  21.     lots = set(x)
  22.     print((lots), end=' '), print("- тип элемента: ", end=' '), print(type(lots))
  23.  
  24. foo_four_one(words)
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
 
Top