SHARE
TWEET

Python - TRUE LOVE

furas Jul 5th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from collections import Counter
  2.  
  3. person1 = input("Input name of Person 1: ")
  4. person2 = input("Input name of Person 2: ")
  5.  
  6. a = Counter(person1)
  7. b = Counter(person2)
  8.  
  9. the_list = [ a[char] + b[char] for char in 'TRUELOVE' ]
  10. #print(the_list)
  11.  
  12. for _ in range(6):
  13.     pairs = list(zip(the_list, the_list[1:]))
  14.     print(pairs)
  15.  
  16.     the_list = [sum(x) % 10 for x in pairs]
  17.     print(the_list)
  18.  
  19. print(''.join(str(x) for x in the_list))
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