start stringlengths 5 368 | code stringlengths 5 143 | end stringlengths 5 527 |
|---|---|---|
a = ['4', '3', '5', '1', '2']; f = 1; w = 5 | w = a.index(str(f)) + 1 | a = ['4', '3', '5', '1', '2']; f = 1; w = 4 |
g = [[0, 2, 1], [1, 1, 1], [2, 0, 0]]; i = [2, 0, 0]; u = [[1, 2, 3], [3, 1, 3], [1, 2, 3]] | u = [list(i) for i in zip(*g)] | g = [[0, 2, 1], [1, 1, 1], [2, 0, 0]]; i = [2, 0, 0]; u = [[0, 1, 2], [2, 1, 0], [1, 1, 0]] |
l = '1'; w = 1 | w += int(l) | l = '1'; w = 2 |
a = 349; b = 1 | n = a ** b | a = 349; b = 1; n = 349 |
i = 3; k = 3; s = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200] | k = s[i] | i = 3; k = 4; s = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200] |
i = 4; j = 0; x = ['a', 'ab', 'aba', 'b', 'ba']; y = ['b'] | y.append(x[i][j]) | i = 4; j = 0; x = ['a', 'ab', 'aba', 'b', 'ba']; y = ['b', 'b'] |
h = 1; k = 2; l = 2 | h += l >= k | h = 2; k = 2; l = 2 |
i = 10; p = 1000000007; s = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] | s[i] = s[i - 1] * i % p | i = 10; p = 1000000007; s = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] |
j = 10 | v.append(j) | j = 10; v = [10] |
a = [3, 7, 0, 0, 0]; m = 2 | a[m] = 1 | a = [3, 7, 1, 0, 0]; m = 2 |
l = [[1, 2], [4, 3]]; r = 1 | r = l[0][0] | l = [[1, 2], [4, 3]]; r = 1 |
i = 0; k = 4; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; m = 9223372036854775807 | m = l[k + i - 1] - l[i] | i = 0; k = 4; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; m = 3 |
a = 42; e = [0, 7, 6, 5, 4, 27, 26, 25, 24, 31, 30, 29, 28, 19, 18, 17, 16, 23, 22, 21, 20, 43] | e += [a] | a = 42; e = [0, 7, 6, 5, 4, 27, 26, 25, 24, 31, 30, 29, 28, 19, 18, 17, 16, 23, 22, 21, 20, 43, 42] |
j = '1' | j = '1' + j | j = '11' |
h = [1, 2, 1]; i = 1; y = [1, 2, 1] | h += [(y[i - 1] + y[i]) % 10 ** 9] | h = [1, 2, 1, 3]; i = 1; y = [1, 2, 1] |
c = 'c'; v = ['e', 'd'] | v.append(c) | c = 'c'; v = ['e', 'd', 'c'] |
m = {(2): 3}; o = 2 | m[o] = m[o] + 1 | m = {2: 4}; o = 2 |
c = 2; k = 4 | k += c | c = 2; k = 6 |
h = [4, 3, 2, 1, 1]; i = 1; u = 4 | u += h[i] | h = [4, 3, 2, 1, 1]; i = 1; u = 7 |
b = '1111111' | b += '1' | b = '11111111' |
i = 4; k = 1; p = 3; q = [[1, 2, 2], [1, 1, 0], [1, 2, 1]]; t = 1 | t += q[p % 3][k - (i - 1 - p)] | i = 4; k = 1; p = 3; q = [[1, 2, 2], [1, 1, 0], [1, 2, 1]]; t = 3 |
b = 'gfdcbeaih'; i = 0; s = 'aabbccddeefghi' | l.append(s.count(b[i])) | b = 'gfdcbeaih'; i = 0; l = [1]; s = 'aabbccddeefghi' |
c = 3; n = 5; q = [1, 1, 2]; r = 4 | q.append(n - max(c, n - r + 1)) | c = 3; n = 5; q = [1, 1, 2, 2]; r = 4 |
g = [1, 2, 3, 4, 8, 12, 16]; u = 15 | g.append(u) | g = [1, 2, 3, 4, 8, 12, 16, 15]; u = 15 |
f = [1, 0, 0, 0]; p = [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 0]] | p.append(f) | f = [1, 0, 0, 0]; p = [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 0], [1, 0, 0, 0]] |
a = [1, 2, 3, 4, 5]; i = 2; k = 4; n = 5; q = [5, 1, None, None, None] | q[i] = a[(i + k) % n] | a = [1, 2, 3, 4, 5]; i = 2; k = 4; n = 5; q = [5, 1, 2, None, None] |
i = 1; k = 1; s = '91011' | k = int(s[:i]) | i = 1; k = 9; s = '91011' |
g = ['h', 'e', 'f', 'g']; j = 3; x = 2 | g[x], g[j] = g[j], g[x] | g = ['h', 'e', 'g', 'f']; j = 3; x = 2 |
b = 8; u = 80 | u += b * b | b = 8; u = 144 |
g = 19; k = 4; v = [1, 3, 6, 10, 20, 40] | g = v[-1] - v[-1 - k] | g = 37; k = 4; v = [1, 3, 6, 10, 20, 40] |
k = 1; v = [0, 0, 0] | k = v[k] | k = 0; v = [0, 0, 0] |
i = 5; u = ['1', '2', '3', '4', '1'] | a.append(u[i - 1]) | a = ['1']; i = 5; u = ['1', '2', '3', '4', '1'] |
i = 69; p = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33]; z = [0, 2, 0, 2, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 2, 1] | z.append(p.count(i)) | i = 69; p = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33]; z = [0, 2, 0, 2, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 2, 1, 0] |
f = [2, 3, 4, 2, 3, 6, 8, 4, 5]; i = 6; s = [0, 0, 1, 2, 1, 0, 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] | s[f[i]] += 1 | f = [2, 3, 4, 2, 3, 6, 8, 4, 5]; i = 6; s = [0, 0, 1, 2, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
i = 0; u = ['lmon', 'dcba', 'dcbb', 'abdc', 'abcd', 'fedcbabcd'] | f = u[i] | f = 'lmon'; i = 0; u = ['lmon', 'dcba', 'dcbb', 'abdc', 'abcd', 'fedcbabcd'] |
f = {(1): [(2, 3), (3, 4)], (2): [(1, 3)], (3): [(1, 4)], (4): [], (5): []}; t = [4, 2, 6] | f[t[1]].append((t[0], t[2])) | f = {1: [(2, 3), (3, 4)], 2: [(1, 3), (4, 6)], 3: [(1, 4)], 4: [], 5: []}; t = [4, 2, 6] |
h = [1, 1, 0]; x = 1 | h.append(x) | h = [1, 1, 0, 1]; x = 1 |
d = {35, 7, 22, 58, 62}; y = {1, 2, 3, 4, 5, 6, 7, 8, 9, 66, 11, 55} | y.symmetric_difference_update(d) | d = {35, 7, 22, 58, 62}; y = {1, 2, 3, 4, 5, 6, 8, 9, 66, 11, 35, 22, 55, 58, 62} |
i = 7; s = 1; u = -24 | u += s * i | i = 7; s = 1; u = -17 |
a = [1, 6, 9]; i = 7; j = 0; t = [0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0] | t[i] = max(t[i], t[i - a[j]] + a[j]) | a = [1, 6, 9]; i = 7; j = 0; t = [0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0] |
p = 11 | p += 1 | p = 12 |
s = '9899100'; x = 7 | x = len(s) | s = '9899100'; x = 7 |
i = 0; p = 8 | i, p = p, i | i = 8; p = 0 |
b = '1' | x = int(b) | b = '1'; x = 1 |
e = 'b'; f = ['a'] | f.append(e) | e = 'b'; f = ['a', 'b'] |
c = 3; e = ['i', 'if', 'ifa', 'ifai', 'ifail', 'ifailu', 'ifailuh', 'ailuhkq', 'ailuhkqq', 'i', 'il', 'ilu', 'iluh']; i = 8; u = 'ifailuhkqq' | e.append(u[c:i]) | c = 3; e = ['i', 'if', 'ifa', 'ifai', 'ifail', 'ifailu', 'ifailuh', 'ailuhkq', 'ailuhkqq', 'i', 'il', 'ilu', 'iluh', 'iluhk']; i = 8; u = 'ifailuhkqq' |
j = 2; k = 3; t = [1, 3, 4, 2] | k = t[j] | j = 2; k = 4; t = [1, 3, 4, 2] |
r = ( 'In the third category he included those Brothers...and prized the strict performance of these forms ' ); x = 'without' | r += x + ' ' | r = 'In the third category he included those Brothers...and prized the strict performance of these forms without '; x = 'without' |
b = ['b', 'e', '', 'b', 'e', 'e', '', 'e', 'a', 'b']; g = 'bebeefeab' | g = ''.join(b) | b = ['b', 'e', '', 'b', 'e', 'e', '', 'e', 'a', 'b']; g = 'bebeeeab' |
g = 'c' | i[g] = 1 | g = 'c'; i = {'c': 1} |
i = 1; n = [-2, 1] | s = [i for i in range(len(n)) if n[i] < 0] | i = 1; n = []; s = [] |
i = 0; r = '9' | i += len(r) | i = 1; r = '9' |
i = 1; v = [2]; x = [[1, 1], [1, 1]] | v.append(sum(x[i])) | i = 1; v = [2, 2]; x = [[1, 1], [1, 1]] |
i = 1; q = ['3', '2'] | i = int(q[0]) | i = 3; q = ['3', '2'] |
e = [-2, -3, -1, -4]; n = -6; x = -10 | e.append(max(x, n)) | e = [-2, -3, -1, -4, -6]; n = -6; x = -10 |
h = 0; n = 1; s = [(1, 0), (1, 1), (1, 1), (1, 0), (1, 2), (0, 0)] | s.append((h, n + 1)) | h = 0; n = 1; s = [(1, 0), (1, 1), (1, 1), (1, 0), (1, 2), (0, 0), (0, 2)] |
w = 1; x = '_' | w += 1 if x == '_' else 0 | w = 2; x = '_' |
g = 0; o = [] | o.append(g) | g = 0; o = [0] |
i = 13; l = [10] | l.append(i) | i = 13; l = [10, 13] |
e = 1; i = 0; t = [0, 1, 0, -1] | t[i] = e | e = 1; i = 0; t = [1, 1, 0, -1] |
f = 3; l = 4 | k = l - f | f = 3; k = 1; l = 4 |
i = 1; y = 5 | y = 5 * i | i = 1; y = 5 |
a = [[], [5, 2, 1, 8]]; d = 0; t = 10 | a[d].append(t) | a = [[10], [5, 2, 1, 8]]; d = 0; t = 10 |
x = -98.7 | x -= 1 | x = -99.7 |
i = 1, 3, 2 | i = list(i) | i = [1, 3, 2] |
o = [1, 0] | o.append(0) | o = [1, 0, 0] |
e = 'bebeefeb'; z = 'b' | e = e.replace(z, '') | e = 'eeefe'; z = 'b' |
j = 3; x = 6 | x = int(j * Pi) | a = -6; j = 3; x = -18 |
a = [0, 0, 1, 1]; g = 1 | a.append(g) | a = [0, 0, 1, 1, 1]; g = 1 |
f = 2; n = 4 | f *= n | f = 8; n = 4 |
i = {}; q = ['2', '3', 'r'] | i[q[0]] = [q[1]] | i = {'2': ['3']}; q = ['2', '3', 'r'] |
j = 0; n = 1000000000000; s = 'a'; v = 1 | x = v * (n // len(s)) + j | j = 0; n = 1000000000000; s = 'a'; v = 1; x = 1000000000000 |
a = {(32): ['31415926535897932384626433832795']}; l = 1 | a[l] = [] | a = {32: ['31415926535897932384626433832795'], 1: []}; l = 1 |
a = 2; b = 10; i = 71; o = 23611832414348226068608 | o += a ^ b << i | a = 2; b = 10; i = 71; o = 47223664828696452137090 |
a = [1, 5, 3, 4, 2] | t = set(a) | a = [1, 5, 3, 4, 2]; t = {1, 2, 3, 4, 5} |
c = 38; g = 70 | g = c - c % 5 + 5 | c = 38; g = 40 |
s = '1 42' | a, b = s.split() | a = '1'; b = '42'; s = '1 42' |
c = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156]; x = 1225 | c.append(x) | c = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225]; x = 1225 |
f = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; l = 0; n = 4; s = deque([1, 5, 9, 13, 14, 15, 16, 12]); t = 1 | s.append(f[t][n - 1 - l]) | f = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; l = 0; n = 4; s = deque([1, 5, 9, 13, 14, 15, 16, 12, 8]); t = 1 |
d = '1' | b += int(d) | b = 36; d = '1' |
c = [3, 4, 7, 5, 6, 2]; j = 3 | c[j - 1], c[j] = c[j], c[j - 1] | c = [3, 4, 5, 7, 6, 2]; j = 3 |
a = 8; s = [5, 2, 1] | s.append(a) | a = 8; s = [5, 2, 1, 8] |
i = 3; s = ['d', 'h', 'c', 'k'] | i = len(s) - 1 | i = 3; s = ['d', 'h', 'c', 'k'] |
i = 4; r = 2; x = [1, 2, 3, 1, 6, 10]; z = 7 | z = sum(x[i:i + r]) | i = 4; r = 2; x = [1, 2, 3, 1, 6, 10]; z = 16 |
m = 10; u = [7, 4, 2, 0, 4, 8] | u.append(m) | m = 10; u = [7, 4, 2, 0, 4, 8, 10] |
f = [[0, 2, 1], [1, 1, 1], [2, 0, 0]]; i = 0; j = 2; r = 1 | r = r + f[j][i] | f = [[0, 2, 1], [1, 1, 1], [2, 0, 0]]; i = 0; j = 2; r = 3 |
g = ['insert', '1', '10']; v = [5] | v.insert(int(g[1]), int(g[2])) | g = ['insert', '1', '10']; v = [5, 10] |
i = 5; y = [0, 0, 0, 0, 0] | y.insert(i, 0) | i = 5; y = [0, 0, 0, 0, 0, 0] |
b = [0, 0, 3, 0, 0, 0]; i = 4; j = 3 | b[j] = i | b = [0, 0, 3, 4, 0, 0]; i = 4; j = 3 |
c = [3]; f = 6 | c.append(f) | c = [3, 6]; f = 6 |
j = 4; k = 4 | k = j + 1 | j = 4; k = 5 |
a = {'times': 0, 'three': 1, 'is': 1, 'not': 1, 'four': 1}; w = 'times' | del a[w] | a = {'three': 1, 'is': 1, 'not': 1, 'four': 1}; w = 'times' |
i = 1; j = 4; q = 'cd'; s = 'cdcd' | q = ''.join(sorted(s[i:j])) | i = 1; j = 4; q = 'cdd'; s = 'cdcd' |
h = '00000000000000001' | h = '0' + h | h = '000000000000000001' |
d = -1; e = 1; k = 2; s = 11; t = 408 | t += k * s * pow(2, d) * pow(2, e) | d = -1; e = 1; k = 2; s = 11; t = 430.0 |
x = [None, None, 1, None, 1, 1, 1, 1, None] | x.append(None) | x = [None, None, 1, None, 1, 1, 1, 1, None, None] |
p = 4; q = [2, 1, 5, 3, 4]; u = 3 | p = q[u] | p = 3; q = [2, 1, 5, 3, 4]; u = 3 |
c = 'a'; g = {'a': 1, 'b': 2, 'c': 1, 'd': 1, 'e': 1} | g[c] += 1 | c = 'a'; g = {'a': 2, 'b': 2, 'c': 1, 'd': 1, 'e': 1} |
i = 1; k = 1; w = [1, 2, 3] | k += w[i] | i = 1; k = 3; w = [1, 2, 3] |
j = 3; p = [1, 2] | p.append(j) | j = 3; p = [1, 2, 3] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.