Advertisement
AlexPt

Untitled

Apr 21st, 2020
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. string = '     Bang!           '
  2. new_str = '    Bang!           '
  3.  
  4.  
  5. def who_first(str1, str2):
  6.  
  7.     result = [i for i in str1 if i != '']
  8.     anode_result = [i for i in str2 if i != '']
  9.  
  10.     if result == anode_result:
  11.         print('a draw')
  12.     elif result > anode_result:
  13.         print('p1')
  14.     else:
  15.         print('p2')
  16.  
  17.  
  18. who_first(string, new_str)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement