We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7aa0e1 commit d423ce1Copy full SHA for d423ce1
xo.py
@@ -0,0 +1,34 @@
1
+def xo(s):
2
+ count_x = 0
3
+ for i in s:
4
+ if i == 'x':
5
+ count_x += 1
6
+ if i == 'X':
7
8
+
9
+ # print count_x
10
11
+ count_o = 0
12
13
+ if i == 'o':
14
+ count_o += 1
15
+ if i == 'O':
16
17
18
+ # print count_o
19
20
+ if count_x == count_o:
21
+ print True
22
23
+ else:
24
+ print False
25
26
+ # if 'x' and 'X' and 'o' and 'O' not in s:
27
+ # return True
28
29
30
+xo('vxQxpxxSxfmExkxAxGborNLxooxxxoxxCodoooxxoxxootxhUoJox')
31
+xo('xo0')
32
+xo('x0xxxooooxxxxxx')
33
+xo('frtxioopx')
34
+xo('FFFF')
0 commit comments