start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
m = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1] | b += m.count(1) | b = 93; m = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1] |
j = 0 | d = j | d = 0; j = 0 |
c = [[-2, -3, '-1', '-4', '-6']]; i = 2; t = 0 | c[t][i] = int(c[t][i]) | c = [[-2, -3, -1, '-4', '-6']]; i = 2; t = 0 |
l = 295636; r = 50 | l = r | l = 50; r = 50 |
i = 'a'; k = {'a': 1} | k[i] += 1 | i = 'a'; k = {'a': 2} |
t = 55; v = 45 | t += int(v) | t = 100; v = 45 |
a = 105; b = [99, 123, 138, 155, 174, 114, 138, 153, 170, 189, 131, 155, 170, 187, 206, 90, 114, 129, 146, 165]; m = 1000 | b.append(a % m) | a = 105; b = [99, 123, 138, 155, 174, 114, 138, 153, 170, 189, 131, 155, 170, 187, 206, 90, 114, 129, 146, 165, 105]; m = 1000 |
b = 6; i = 0 | b = i | b = 0; i = 0 |
r = """In the third category he included those Brothers... breathless from his gallop and his excitement.\n """ | r = r.replace('\n ', '\n') | r = 'In the third category he included those Brothers... breathless from his gallop and his excitement.\n' |
g = ['C']; i = 1; l = ['C', 'A', 'A'] | g.append(l[i]) | g = ['C', 'A']; i = 1; l = ['C', 'A', 'A'] |
g = [111, 107, 102, 102, 110, 101, -1, -1, -1, -1, -1]; i = 5; k = 2 | g[i] += k | g = [111, 107, 102, 102, 110, 103, -1, -1, -1, -1, -1]; i = 5; k = 2 |
i = '1' | g[i] = [] | g = {'1': []}; i = '1' |
h = 1; i = 4; w = '1 9' | h, i = [int(k) for k in w.split()] | h = 1; i = 9; w = '1 9' |
p = 4; u = 3 | p = 2 ** u | p = 8; u = 3 |
g = [(4, [1, 1, 1, 1]), (300000, []), (300000, [])]; s = 5, [1, 1, 1, 1, 1] | g.append(s) | g = [(4, [1, 1, 1, 1]), (300000, []), (300000, []), (5, [1, 1, 1, 1, 1])]; s = (5, [1, 1, 1, 1, 1]) |
b = {(0): [], (1): [], (2): [], (3): [], (4): [], (5): [], (6): [], (7): [], (8): [], (9): []}; i = 10 | b[i] = [] | b = {0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: []}; i = 10 |
m = 5; r = None; s = [(5, None), (8, 1)] | m, r = s[-1] | m = 8; r = 1; s = [(5, None), (8, 1)] |
a = 2; b = 10; i = 4; x = 154 | x += a ^ b << i | a = 2; b = 10; i = 4; x = 316 |
t = -4; v = -1; y = 3.0 | y = t / v | t = -4; v = -1; y = 4.0 |
i = 33; n = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 20, 1, 23, 0, 24, 1, 27, 0, 28, 1, 31, 0, 32] | n.append(n[-1] ^ i) | i = 33; n = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 20, 1, 23, 0, 24, 1, 27, 0, 28, 1, 31, 0, 32, 1] |
a = {'_': 2}; x = 3 | x = a.get('_', 0) | a = {'_': 2}; x = 2 |
q = '40\n'; y = [1, 2, 3, 4, 10, 20, 30] | y.append(int(q.strip())) | q = '40\n'; y = [1, 2, 3, 4, 10, 20, 30, 40] |
k = 3; p = 4 | p = p - k | k = 3; p = 1 |
i = 3; j = 0; m = [[1, 1, 1], [1, 1, 1], [1, 2, 2], [0, 0, 0], [0, 0, 0]]; y = [1, 2, 3] | m[i][j] = m[i - y[j]][j] + m[i][j - 1] | i = 3; j = 0; m = [[1, 1, 1], [1, 1, 1], [1, 2, 2], [1, 0, 0], [0, 0, 0]]; y = [1, 2, 3] |
d = [1, 2]; j = 0; z = 1 | z = d[j] | d = [1, 2]; j = 0; z = 1 |
d = 3; i = 1; s = {(0): 1, (1): 1, (2): 1} | s[i % d] += 1 | d = 3; i = 1; s = {0: 1, 1: 2, 2: 1} |
f = [1, 4, 5, 3, 2]; i = 3; u = {(1): [1], (4): [2], (5): [3]} | u[f[i]] = [i + 1] | f = [1, 4, 5, 3, 2]; i = 3; u = {1: [1], 4: [2], 5: [3], 3: [4]} |
e = 2; f = 1 | f = e | e = 2; f = 2 |
x = '1'; y = '2'; z = '3' | s.append([int(x), int(y), int(z)]) | s = [[1, 2, 3]]; x = '1'; y = '2'; z = '3' |
f = [True, False, True, False, False, False]; v = 1 | f[v] = True | f = [True, True, True, False, False, False]; v = 1 |
j = 2; l = 1; q = [1, 1, 1, 1] | q[l] += q[j] | j = 2; l = 1; q = [1, 2, 1, 1] |
w = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | w.append(0) | w = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
f = 9227465; s = 14930352 | f = s | f = 14930352; s = 14930352 |
f = 0; p = 1; r = 1 | f, p = r // 2, r % 2 | f = 0; p = 1; r = 1 |
k = 10 | x = k | k = 10; x = 10 |
r = 3 | r -= 1 | r = 2 |
r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | r.append(0) | r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
j = 0; p = '1'; s = '01' | p += s[j] | j = 0; p = '10'; s = '01' |
m = {'aa': 'aa', 'ab': 'c', 'ac': 'b', 'ba': 'c', 'bb': 'bb', 'bc': 'a', 'ca': 'b'} | m['cb'] = 'a' | m = {'aa': 'aa', 'ab': 'c', 'ac': 'b', 'ba': 'c', 'bb': 'bb', 'bc': 'a', 'ca': 'b', 'cb': 'a'} |
j = 2; n = ['e', 'f', 'b', 'a']; t = 'eaeeea' | t += n[j] | j = 2; n = ['e', 'f', 'b', 'a']; t = 'eaeeeab' |
d = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [], [], []]; i = 3; m = 6 | d[i] = [(0) for _ in range(m)] | d = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [], []]; i = 3; m = 6 |
j = [1]; o = 3; p = {(1): [2, 3], (2): [1], (3): [1]} | j.append(o) | j = [1, 3]; o = 3; p = {1: [2, 3], 2: [1], 3: [1]} |
g = [1, 1, 1] | b = sum(g) | b = 3; g = [1, 1, 1] |
b = 2; o = 0 | o = max(o, b) | b = 2; o = 2 |
i = 5; j = 9; p = 'hku'; s = 'ifailuhkqq' | p = ''.join(sorted(s[i:j])) | i = 5; j = 9; p = 'hkqu'; s = 'ifailuhkqq' |
i = 0; k = [2, 2, 1, 1] | s = s + k[i] | i = 0; k = [2, 2, 1, 1]; s = -69 |
i = 7; m = 6 | m = i | i = 7; m = 7 |
c = ['5', 'question'] | c.append(False) | c = ['5', 'question', False] |
z = ['e', 'd', 'd', 'e', 'e', 'd', 'e', 'd'] | z.reverse() | z = ['d', 'e', 'd', 'e', 'e', 'd', 'd', 'e'] |
x = [2, 4, 3, 5, 2]; z = 6 | x.append(z) | x = [2, 4, 3, 5, 2, 6]; z = 6 |
a = [1, 2, 3]; k = 2; n = 3 | b = a[n - k:] | a = [1, 2, 3]; b = [2, 3]; k = 2; n = 3 |
i = 25; w = 4 | i += w | i = 29; w = 4 |
c = 'u'; h = '\naeiouuoiea'; i = 3 | c = h[i] | c = 'i'; h = '\naeiouuoiea'; i = 3 |
g = 1.0; j = 5.0 | j += g | g = 1.0; j = 6.0 |
h = 200560490130; x = 37 | h = h * x | h = 7420738134810; x = 37 |
l = 2; o = 3; y = 4 | l = y - o | l = 1; o = 3; y = 4 |
i = 0; j = 2; k = 2; p = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1]] | p.append([i, j, k]) | i = 0; j = 2; k = 2; p = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1], [0, 2, 2]] |
a = [1, 4, 2, 3]; c = 3; l = 2 | c = a[l - 1] | a = [1, 4, 2, 3]; c = 4; l = 2 |
c = 'a'; i = 0; p = {} | p[c] = [i] | c = 'a'; i = 0; p = {'a': [0]} |
l = []; n = [[2, 24], [4, 20]] | n = [list(k) for k in l] | l = []; n = [] |
j = 600; w = [500, 600] | j = min(j, w[1]) | j = 600; w = [500, 600] |
l = 1; x = [3]; z = [4, 1] | x = z[0:l] | l = 1; x = [4]; z = [4, 1] |
h = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]; i = 2; j = 2; y = 2 | y = h[i][j] + h[i][j + 1] + h[i][j + 2] | h = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]; i = 2; j = 2; y = 1 |
d = 2; k = 20 | k -= d | d = 2; k = 18 |
q = 0 | q = q - 1 | q = -1 |
q = [1, 2, 3, 4] | j = q[3] | j = 4; q = [1, 2, 3, 4] |
k = 2; t = 3; v = 1 | v += (k % 100) ** (t % 100) | k = 2; t = 3; v = 9 |
c = [[1, 2, 4], []]; i = 2; j = 1 | c[j].append(i + 1) | c = [[1, 2, 4], [3]]; i = 2; j = 1 |
a = [4, 4, 4, 4]; b = [3, 3, 3, 3] | d = (abs(x - y) - 1 for x, y in zip(a, b)) | a = [4, 4, 4, 4]; b = [3, 3, 3, 3]; d = <generator object <genexpr> at 0x7f1bf43daa50> |
n = 2; s = [0, 0, 4, 0, 0] | s = [0] * (n + 1) | n = 2; s = [0, 0, 0] |
a = 7; i = 5; x = {(7): 0, (1): 4, (3): 2, (4): 3} | x[a] = i | a = 7; i = 5; x = {7: 5, 1: 4, 3: 2, 4: 3} |
j = 100; y = 100 | y += j | j = 100; y = 200 |
t = 0 | m = t * 2 + 3 | m = 3; t = 0 |
d = 0 | d += 1 | d = 1 |
r = ['+', '+', '+', '+', '+', '-', '+', '+', '+', '+']; z = [['+', '-', '+', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '-', '-', '-', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '-', '-', '+', '+', '+'], ['+', '-', '+', '+', '+', '+']] | z.append(r) | r = ['+', '+', '+', '+', '+', '-', '+', '+', '+', '+']; z = [['+', '-', '+', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '-', '-', '-', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '-', '-', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '+', '+', '+', '+', '-', '+', '+', '+', '+']] |
n = 2; r = 2; u = {(0, 0): 1, (1, 0): 1, (1, 1): 1, (2, 1): 2, (2, 2): 1, (3, 1): 3, (4, 1): 4, (3, 2): 3}; x = 6 | u[n, r] = x | n = 2; r = 2; u = {(0, 0): 1, (1, 0): 1, (1, 1): 1, (2, 1): 2, (2, 2): 6, (3, 1): 3, (4, 1): 4, (3, 2): 3}; x = 6 |
e = 3; i = 1; j = 0; s = [[0, 2, 1], [1, 1, 1], [2, 0, 0]] | e += s[i][j] | e = 4; i = 1; j = 0; s = [[0, 2, 1], [1, 1, 1], [2, 0, 0]] |
g = [10, 20, 30, 100, 200, 300, 1000]; i = 0; s = 3; x = 60 | x = x - g[i] + g[i + s] | g = [10, 20, 30, 100, 200, 300, 1000]; i = 0; s = 3; x = 150 |
x = [0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | x = [0] * (ord('z') - ord('a') + 1) | x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
e = 6; k = 10 | e = max(e, k) | e = 10; k = 10 |
a = [4, 12]; b = [[1, 3]] | b.append(a) | a = [4, 12]; b = [[1, 3], [4, 12]] |
r = []; v = 4 | v = len(r) | r = []; v = 0 |
d = OrderedDict([('BANANA FRIES', 12)]); n = 'POTATO CHIPS' | d[n] = 0 | d = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 0)]); n = 'POTATO CHIPS' |
i = 2; l = '\naeiouuoiea'; s = ['\n', 'a'] | s.append(l[i]) | i = 2; l = '\naeiouuoiea'; s = ['\n', 'a', 'e'] |
i = '{' | o.append(i) | i = '{'; o = ['{'] |
b = '199'; c = '255'; s = '199' | b, s, c = [int(b), int(s), int(c)] | b = 199; c = 255; s = 199 |
h = 2.0; s = [1, 2, 3, 4, 5, 6, 7] | h = sum(s) / len(s) | h = 4.0; s = [1, 2, 3, 4, 5, 6, 7] |
a = '28'; s = '17'; x = '30' | s, a, x = [int(s), int(a), int(x)] | a = 28; s = 17; x = 30 |
c = [[0, 0, 0], [2, 0, 0], [0, 0, 0]]; g = 1; i = 2; j = 0 | c[i][j] = g | c = [[0, 0, 0], [2, 0, 0], [1, 0, 0]]; g = 1; i = 2; j = 0 |
l = 1; t = 1.75; u = 5 | t = (l + u) / 2 | l = 1; t = 3.0; u = 5 |
i = 3; s = 3; w = -12 | w += s * i | i = 3; s = 3; w = -3 |
w = {'Krishna': 68.0}; y = ['Arjun', '70', '98', '63'] | w[y[0]] = (float(y[1]) + float(y[2]) + float(y[3])) / 3 | w = {'Krishna': 68.0, 'Arjun': 77.0}; y = ['Arjun', '70', '98', '63'] |
h = 47; m = 25 | h = m * 2 + 3 | h = 53; m = 25 |
l = [2, 1] | z = l.index(max(l[sv:])) | l = [2, 1]; t = -72; z = 0 |
i = 'o'; x = [0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | x[ord(i) - ord('a')] += 1 | i = 'o'; x = [0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
a = [0, 1]; i = 2 | a.append(a[-1] ^ i) | a = [0, 1, 3]; i = 2 |
b = ['CANDY', '5']; u = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30), ('APPLE JUICE', 20), ('CANDY', 15)]) | u[b[0]] += int(b[1]) | b = ['CANDY', '5']; u = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30), ('APPLE JUICE', 20), ('CANDY', 20)]) |
a = 0; b = 1 | h = {(0): {a, b}} | a = 0; b = 1; h = {0: {0, 1}} |
r = ['{', '{']; y = '[' | y = r.pop() | r = ['{']; y = '{' |
c = 'haveaniceday'; e = 'via'; j = 3 | e = e + c[j] | c = 'haveaniceday'; e = 'viae'; j = 3 |
Subsets and Splits