start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
k = '1\n' | g.append(k.strip()) | g = ['1']; k = '1\n' |
a = 2147483647 | x = ~a & allf | a = 2147483647; w = 24; x = 0 |
h = 5; m = [1, 2, 4] | m = m + [h] | h = 5; m = [1, 2, 4, 5] |
a = [(1, 8, 1), (2, 4, 2), (3, 5, 6)]; d = 1; i = 4; t = 3 | a.append((i, t, d)) | a = [(1, 8, 1), (2, 4, 2), (3, 5, 6), (4, 3, 1)]; d = 1; i = 4; t = 3 |
c = 'yx'; j = 'x' | c = c.replace(j, '', 1) | c = 'y'; j = 'x' |
c = 2; i = 1 | i += c // 2 | c = 2; i = 2 |
u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | u.append(0) | u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
i = 0; v = 3; y = [{'data': 1, 'left': 1, 'right': None, 'height': 1}] | y[i]['right'] = v - 1 | i = 0; v = 3; y = [{'data': 1, 'left': 1, 'right': 2, 'height': 1}] |
g = 2.5; u = 3 | g = u | g = 3; u = 3 |
w = ['d', 'e', 'd', 'd', 'e', 'e', 'd', 'e', 'd', 'e']; x = ['d', 'e', 'd', 'e', 'e', 'd', 'd', 'e', 'd', 'e'] | x = w.copy() | w = ['d', 'e', 'd', 'd', 'e', 'e', 'd', 'e', 'd', 'e']; x = ['d', 'e', 'd', 'd', 'e', 'e', 'd', 'e', 'd', 'e'] |
q = 2.2737367544323206e-12; t = 4.547473508864641e-12 | t = q % 2 | q = 2.2737367544323206e-12; t = 2.2737367544323206e-12 |
f = [[112, 42, 83, 119], [56, 125, 56, 49]]; p = [15, 78, 101, 43] | f.append(p) | f = [[112, 42, 83, 119], [56, 125, 56, 49], [15, 78, 101, 43]]; p = [15, 78, 101, 43] |
i = '('; o = ['{', '{', '[', '[', '('] | o.append(i) | i = '('; o = ['{', '{', '[', '[', '(', '('] |
j = -1; l = [4, 4, 7, 5, 6, 2]; x = 3 | l[j + 1] = x | j = -1; l = [3, 4, 7, 5, 6, 2]; x = 3 |
b = 4; s = 'eeefe' | b = len(s) | b = 5; s = 'eeefe' |
d = 109; k = 2 | d += k | d = 111; k = 2 |
a = [4, 2, 4, 6, 1]; i = 1; k = 17 | k -= a[i] | a = [4, 2, 4, 6, 1]; i = 1; k = 15 |
s = 31; w = 6469693230 | w *= s | s = 31; w = 200560490130 |
f = [['X', 'X', 'X', 'X', 'X', 'X'], ['X', '.', 'X', '.', 'X', 'X'], ['X', '.', 'X', '.', 'X', 'X']]; u = ['X', '.', 'X', 'X', '.', 'X', '.', 'X', 'M', '.', '.', '.', 'X'] | f.append(u) | f = [['X', 'X', 'X', 'X', 'X', 'X'], ['X', '.', 'X', '.', 'X', 'X'], ['X', '.', 'X', '.', 'X', 'X'], ['X', '.', 'X', 'X', '.', 'X', '.', 'X', 'M', '.', '.', '.', 'X']]; u = ['X', '.', 'X', 'X', '.', 'X', '.', 'X', 'M', '.', '.', '.', 'X'] |
n = 3; u = 7 | u = n | n = 3; u = 3 |
n = 5; r = 5 | r = min(r, n - r) | n = 5; r = 0 |
i = 4; q = [0, 9, 27, 63, 135] | q.append(q[-1] + 9 * 2 ** i) | i = 4; q = [0, 9, 27, 63, 135, 279] |
c = [4, 3, 2, 3, 1] | c.sort() | c = [1, 2, 3, 3, 4] |
i = 3; o = 98; s = 'hefg' | o = ord(s[i]) | i = 3; o = 103; s = 'hefg' |
i = 3; m = 32; x = ['a', 'ab', 'abc', 'b', 'bc', 'c']; y = ['b'] | m = m + pow(len(x[i]), len(y)) | i = 3; m = 33.0; x = ['a', 'ab', 'abc', 'b', 'bc', 'c']; y = ['b'] |
i = 12; j = 15; o = 2 | o = i ^ j | i = 12; j = 15; o = 3 |
i = 1; s = 'kkkkkkz'; u = 2 | u = s[:u].rfind(s[i]) | i = 1; s = 'kkkkkkz'; u = 1 |
k = 9; t = 'aardvark' | k = len(t) | k = 8; t = 'aardvark' |
c = 'a'; e = {'a': 1, 'b': 2, 'c': 2, 'd': 2, 'e': 3, 'f': 2, 'g': 2, 'h': 2} | e[c] += 1 | c = 'a'; e = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 3, 'f': 2, 'g': 2, 'h': 2} |
n = '35601423' | n = bin(int(n))[2:].zfill(32) | n = '00000010000111110011110000001111' |
i = 0 | i, j = 0, 0 | i = 0; j = 0 |
a = [0, 0, 0, 0, 0, 0, 0] | a.append(0) | a = [0, 0, 0, 0, 0, 0, 0, 0] |
g = 'e'; k = 1; p = [{'c': 1, 'd': 1, 'e': 1}, {'a': 1, 'b': 1, 'c': 1}] | k += p[0][g] | g = 'e'; k = 2; p = [{'c': 1, 'd': 1, 'e': 1}, {'a': 1, 'b': 1, 'c': 1}] |
a = [0, 1]; x = '1' | a.append(int(x)) | a = [0, 1, 1]; x = '1' |
s = [104, 99, 100, 107]; u = ['d', 'h', 'k', 'c'] | u = list(map(chr, s)) | s = [104, 99, 100, 107]; u = ['h', 'c', 'd', 'k'] |
a = '11111111111111' | a += '1' | a = '111111111111111' |
a = [3, 4, 4, 4, 8]; j = 4; l = 1; x = [0, 0, 0, 3, 3, 0, 0, 0, 0, 0] | x[j] = max(x[j], a[l] + x[j - a[l]]) | a = [3, 4, 4, 4, 8]; j = 4; l = 1; x = [0, 0, 0, 3, 4, 0, 0, 0, 0, 0] |
d = 3; i = 0; j = [2, 4, 4, 6, 8] | j[i + 1] = d | d = 3; i = 0; j = [2, 3, 4, 6, 8] |
g = [3, 3, 9, 9, 5]; j = 3; p = 1; x = 7 | p = (p + g[j]) % x | g = [3, 3, 9, 9, 5]; j = 3; p = 3; x = 7 |
i = 4; m = [1, 2, 1, 3, 2]; w = 3 | w += m[i] | i = 4; m = [1, 2, 1, 3, 2]; w = 5 |
i = 2 | i += 1 | i = 3 |
d = 'ok'; h = 'f' | d += h | d = 'okf'; h = 'f' |
p = {9, 2, 4, 5}; q = {2, 11, 4, 12} | f = p.union(q).difference(p.intersection(q)) | f = {9, 11, 12, 5}; p = {9, 2, 4, 5}; q = {2, 11, 4, 12} |
i = 1; m = 6; u = [[0, 0, 0, 0, 0, 0], [], [], [], [], []] | u[i] = [(0) for _ in range(m)] | i = 1; m = 6; u = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [], [], [], []] |
n = 4; p = [[0, 0, 0, 0, 0]] | p.append([(0) for x in range(n + 1)]) | n = 4; p = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] |
a = [2, 3, 4, 4, 5, 6]; b = [1, 2, '']; i = 2; j = 5; k = 2 | b[i] = a[j] // k | a = [2, 3, 4, 4, 5, 6]; b = [1, 2, 3]; i = 2; j = 5; k = 2 |
q = 1; u = 5 | u += q | q = 1; u = 6 |
j = {(0): {'n': 0, 'items': []}}; n = 1; v = 1 | m = j[n - v] | j = {0: {'n': 0, 'items': []}}; m = {'n': 0, 'items': []}; n = 1; v = 1 |
e = ['c', 'd']; i = 1; j = 2; s = 'cdcd' | e.append(s[j:j + i]) | e = ['c', 'd', 'c']; i = 1; j = 2; s = 'cdcd' |
g = 2.465190328815662e-32; i = 2 | g /= i | g = 1.232595164407831e-32; i = 2 |
g = ['2', '2', '2', '2', '2', '2', '2']; i = 4; j = 3; t = [] | t = g[j:i] | g = ['2', '2', '2', '2', '2', '2', '2']; i = 4; j = 3; t = ['2'] |
g = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]; u = 1000000007 | g.append((g[-1] + g[-2]) % u) | g = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]; u = 1000000007 |
i = 14; j = 14; p = 3 | p = i ^ j | i = 14; j = 14; p = 0 |
b = [7, 8, 9]; i = 0; m = 2 | b[i] = b[i + m] | b = [9, 8, 9]; i = 0; m = 2 |
d = 4.0; i = 5 | d = i | d = 5; i = 5 |
a = 3; w = [2] | w.append(a) | a = 3; w = [2, 3] |
i = 10; q = {(1): [1], (2): [2, 3], (3): [4, 5], (4): [6, 7, 8], (5): [9, 10]}; t = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5] | q[t[i]].append(i + 1) | i = 10; q = {1: [1], 2: [2, 3], 3: [4, 5], 4: [6, 7, 8], 5: [9, 10, 11]}; t = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5] |
d = [[1], [2], [3]]; i = ['M', 1, 2]; k = [-1, 0, 1, 2] | d[k[i[1]]].extend(d[k[i[2]]]) | d = [[1, 2], [2], [3]]; i = ['M', 1, 2]; k = [-1, 0, 1, 2] |
e = [[0, 3, 4, 1000000000, 1000000000], [3, 0, 1000000000, 6, 1000000000], [4, 1000000000, 0, 1000000000, 1000000000], [1000000000, 6, 1000000000, 0, 1000000000], [1000000000, 2, 1000000000, 1000000000, 0]]; r = 2; x = 5; y = 2 | e[y - 1][x - 1] = r | e = [[0, 3, 4, 1000000000, 1000000000], [3, 0, 1000000000, 6, 2], [4, 1000000000, 0, 1000000000, 1000000000], [1000000000, 6, 1000000000, 0, 1000000000], [1000000000, 2, 1000000000, 1000000000, 0]]; r = 2; x = 5; y = 2 |
a = 4, 4, 1 | a = list(a) | a = [4, 4, 1] |
n = '2147483648' | u += n + '\n' | n = '2147483648'; u = 'cd2JlLPjHMlt2147483648\n' |
i = '['; o = ['{', '{', '['] | o.append(i) | i = '['; o = ['{', '{', '[', '['] |
i = 'c'; n = {'a': 0, 'b': 0} | n[i] = 0 | i = 'c'; n = {'a': 0, 'b': 0, 'c': 0} |
a = 4; s = 2 | a = s | a = 2; s = 2 |
a = 18; x = [0, 7, 6, 5, 4, 27, 26, 25, 24, 31, 30, 29, 28, 19] | x += [a] | a = 18; x = [0, 7, 6, 5, 4, 27, 26, 25, 24, 31, 30, 29, 28, 19, 18] |
i = 5; j = 0; x = ['a', 'ab', 'abc', 'b', 'bc', 'c']; y = ['b', 'c'] | y.append(x[i][j]) | i = 5; j = 0; x = ['a', 'ab', 'abc', 'b', 'bc', 'c']; y = ['b', 'c', 'c'] |
a = [1, 2, 1]; i = 0; r = 2; t = 1, 3, 1 | t = tuple(a[:i] + [r] + a[i + 1:]) | a = [1, 2, 1]; i = 0; r = 2; t = (2, 2, 1) |
n = '148 3' | n = n.rsplit(' ', 1)[0] | n = '148' |
h = [1, 1, 4, 1, 1]; i = 1; t = 7 | t -= h[i] | h = [1, 1, 4, 1, 1]; i = 1; t = 6 |
d = [['1', '1', '1', '2'], ['1', '9', '1', '2'], '1892', '1234']; i = 2 | d[i] = list(d[i]) | d = [['1', '1', '1', '2'], ['1', '9', '1', '2'], ['1', '8', '9', '2'], '1234']; i = 2 |
a = 3; b = 0; e = 8 | e = b + a | a = 3; b = 0; e = 3 |
a = Counter({(3): 1, (5): 0, (7): 0, (11): 0, (8): 1}); c = 1; x = 8 | a[x] -= c | a = Counter({3: 1, 5: 0, 7: 0, 11: 0, 8: 0}); c = 1; x = 8 |
o = ['1', '2', '100'] | k = int(o[1]) | k = 2; o = ['1', '2', '100'] |
h = 0; u = [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] | u[h] += 1 | h = 0; u = [1, 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 = 2; s = [2]; x = [10, 12, 16, 18, 30, 32] | s.append(x[j] - x[j - 1]) | j = 2; s = [2, 4]; x = [10, 12, 16, 18, 30, 32] |
d = {(1): True, (5): True, (3): True}; i = 4 | d[i] = True | d = {1: True, 5: True, 3: True, 4: True}; i = 4 |
j = 1; n = ['h', 'e', 'f', 'g'] | j = len(n) - 1 | j = 3; n = ['h', 'e', 'f', 'g'] |
f = 2310; k = 11 | f = f * k | f = 25410; k = 11 |
g = [1, 2, 2, 1] | g.sort() | g = [1, 1, 2, 2] |
i = 5; j = 7; w = 3 | j = i + w | i = 5; j = 8; w = 3 |
c = 0; p = [2, 2, 1, 1] | c = p.pop() | c = 1; p = [2, 2, 1] |
a = 1; f = 1; n = 1 | d = min(n - f, a - 1) | a = 1; d = 0; f = 1; n = 1 |
k = 0.001953125; o = 4.7498836524027865; z = 2 | o *= k % z + 1 | k = 0.001953125; o = 4.759160768911386; z = 2 |
w = ['c', 'a', 'b', ' ', ' '] | u = len(set(w)) | u = 4; w = ['c', 'a', 'b', ' ', ' '] |
e = [[1, 2, 4, 5]]; x = [1, 2, 3, 4, 5] | e.append(x) | e = [[1, 2, 4, 5], [1, 2, 3, 4, 5]]; x = [1, 2, 3, 4, 5] |
h = 210; i = 6; j = 9; k = 4; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200, 0]; s = [1, 3, 6, 10, 20, 40, 70, 110, 210, 410] | h = (k - 1) * l[j] - (s[j - 1] - s[i - 1]) | h = 430; i = 6; j = 9; k = 4; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200, 0]; s = [1, 3, 6, 10, 20, 40, 70, 110, 210, 410] |
f = 4; o = 1 | o = f | f = 4; o = 4 |
d = 4; q = [2, 1, 5, 3, 4] | b = q[d] | b = 4; d = 4; q = [2, 1, 5, 3, 4] |
k = 3; m = 'aaaaabbbbaaaa'; n = 9; p = 'aabbb' | p = m[k:n] | k = 3; m = 'aaaaabbbbaaaa'; n = 9; p = 'aabbbb' |
c = 1; i = 5; o = [1, 2, 3, 2, 2, 2, 1] | o[i] -= c | c = 1; i = 5; o = [1, 2, 3, 2, 2, 1, 1] |
f = [3, 4, 1, 1]; n = 3 | n = f.pop() | f = [3, 4, 1]; n = 1 |
n = 1000000000000; s = 'a' | q = n // len(s) | n = 1000000000000; q = 1000000000000; s = 'a' |
c = 3; f = 4; q = [2, 5, 1, 3, 4] | f = q[c] | c = 3; f = 3; q = [2, 5, 1, 3, 4] |
j = 2; l = 1 | l = j | j = 2; l = 2 |
g = [146, 0, 7, 1]; w = 0 | g[w] += 1 | g = [147, 0, 7, 1]; w = 0 |
w = [0, 1, 2, 3, 2, 2, 1, 0] | w = [x for x in w if x > 0] | w = [1, 2, 3, 2, 2, 1] |
r = 1 | f = [(r, 0)] | f = [(1, 0)]; r = 1 |
x = 134217728 | x *= 2 | x = 268435456 |
b = 6 | b += 1 | b = 7 |
c = 'r'; q = {'w': True, 'o': True} | q[c] = True | c = 'r'; q = {'w': True, 'o': True, 'r': True} |
Subsets and Splits