start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
i = 3; s = 'aacb'; t = 'aacb' | t = s[:i - 1] + s[i] + s[i - 1] + s[i + 1:] | i = 3; s = 'aacb'; t = 'aabc' |
i = 1; j = 1000000007 | z.append(z[i - 1] * i % j) | i = 1; j = 1000000007; z = [8, 5, 9, -2, 2, 8] |
i = 6; u = [1, 2, 1, 2, 1, 2, 1, 1] | u[i + 1] = u[i] + 1 | i = 6; u = [1, 2, 1, 2, 1, 2, 1, 2] |
a = 'a'; b = 'i'; e = ['a', 'j'] | a, b = e | a = 'a'; b = 'j'; e = ['a', 'j'] |
h = [1, 3, 1, 3, 1, 4, 1, 3, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7]; i = 97 | m[chr(i)] = h[i - ord('a')] | h = [1, 3, 1, 3, 1, 4, 1, 3, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7]; i = 97; m = {'a': 1} |
a = [2, 3, 1]; j = 1 | a[j], a[j + 1] = a[j + 1], a[j] | a = [2, 1, 3]; j = 1 |
i = 'e'; s = 'ee' | s += i | i = 'e'; s = 'eee' |
h = 'aaaaabbbbaaaa'; k = 6; n = 8; p = 'b' | p = h[k:n] | h = 'aaaaabbbbaaaa'; k = 6; n = 8; p = 'bb' |
i = 4; j = 0; w = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1], [0, 0, 0, 2, 2, 2], [0, 1, 1, 2, 2, 3], [0, 1, 2, 2, 2, 3], [0, 0, 0, 0, 0, 0]] | w[i + 1][j + 1] = max(w[i + 1][j], w[i][j + 1]) | i = 4; j = 0; w = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1], [0, 0, 0, 2, 2, 2], [0, 1, 1, 2, 2, 3], [0, 1, 2, 2, 2, 3], [0, 1, 0, 0, 0, 0]] |
d = ['a']; s = 'a' | d.append(s) | d = ['a', 'a']; s = 'a' |
c = '0'; h = '9910001' | h += c | c = '0'; h = '99100010' |
n = 2.5; w = 7 | n = (w - 1) / 2 | n = 3.0; w = 7 |
m = '6'; n = '6'; x = '2'; y = '5' | n, m, x, y = [int(n), int(m), int(x), int(y)] | m = 6; n = 6; x = 2; y = 5 |
a = 0; i = 4 | a = i | a = 4; i = 4 |
c = {(1): [3], (3): [1, 4], (4): [3]}; p = 4; r = 2 | c[r] = [p] | c = {1: [3], 3: [1, 4], 4: [3], 2: [4]}; p = 4; r = 2 |
a = 5; i = 1; x = 7 | x = a + i | a = 5; i = 1; x = 6 |
a = '3' | a = int(a) | a = 3 |
x = 100000 | l = str(x) | l = '100000'; x = 100000 |
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x']; i = 121 | a.append(chr(i)) | a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y']; i = 121 |
i = 1 | n = i | i = 1; n = 1 |
v = [[2, 2], [1, 1], [4, 3]]; z = 2 | z = len(v) | v = [[2, 2], [1, 1], [4, 3]]; z = 3 |
i = 1; r = [1, 4, 2, 3]; y = 3 | y = r[i] | i = 1; r = [1, 4, 2, 3]; y = 4 |
z = [1, 6, 15, 20, 15, 6] | z += [1] | z = [1, 6, 15, 20, 15, 6, 1] |
t = [1, 3, 5, 7, 9] | b = sorted(t) | b = [1, 3, 5, 7, 9]; t = [1, 3, 5, 7, 9] |
w = 'acghgh'; y = 0 | y = ord(w[0]) - ord('a') | w = 'acghgh'; y = 0 |
i = 1; m = 2; s = [[[0, 2, 0]], [], [], [], [], [], []] | x = [[m, m, s[i - 1][-1][SUM]]] | i = 1; m = 2; n = False; s = [[[0, 2, 0]], [], [], [], [], [], []]; x = [[2, 2, 0]] |
i = 1; j = 3 | t = {(i, j)} | i = 1; j = 3; t = {(1, 3)} |
g = [12, 5, 111, 200, 1000, 10]; s = [111]; x = 3 | s.append(g[x]) | g = [12, 5, 111, 200, 1000, 10]; s = [111, 200]; x = 3 |
s = [1, 2, 2, 3]; u = 1 | r = s.index(u) | r = 0; s = [1, 2, 2, 3]; u = 1 |
e = '5'; x = 6 | e = str(x) | e = '6'; x = 6 |
c = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1], [1, 1, 2], [1, 2, 0], [1, 2, 1], [1, 2, 2]]; i = 2; j = 0; k = 1 | c.append([i, j, k]) | c = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1], [1, 1, 2], [1, 2, 0], [1, 2, 1], [1, 2, 2], [2, 0, 1]]; i = 2; j = 0; k = 1 |
l = '('; y = ['{', '{', '[', '['] | y.append(l) | l = '('; y = ['{', '{', '[', '[', '('] |
s = 'abcdde' | s = list(s) | s = ['a', 'b', 'c', 'd', 'd', 'e'] |
a = 2; b = 10; f = 3169126500570573503741758013622; i = 98 | f += a ^ b << i | a = 2; b = 10; f = 6338253001141147007483516027064; i = 98 |
b = [0, 0, 0, 0] | b.append(0) | b = [0, 0, 0, 0, 0] |
c = [2, 5, 6] | k = c | c = [2, 5, 6]; k = [2, 5, 6] |
i = 2; l = 4; q = ['a', 'i', 'l']; v = ['i', 'f', 'a', 'i', 'l', 'u', 'h', 'k', 'q', 'q'] | q = v[i:i + l] | i = 2; l = 4; q = ['a', 'i', 'l', 'u']; v = ['i', 'f', 'a', 'i', 'l', 'u', 'h', 'k', 'q', 'q'] |
a = 1; b = 1; q = [1, 2, 5, 3, 4] | a = q[b] | a = 2; b = 1; q = [1, 2, 5, 3, 4] |
p = 3; z = [5, 7, 9] | p = z[0] | p = 5; z = [5, 7, 9] |
i = 3; x = ['1', '1st', '2', '2nd'] | x.append(str(i)) | i = 3; x = ['1', '1st', '2', '2nd', '3'] |
m = 3; o = deque([3, 2, 1]) | m = o.popleft() | m = 3; o = deque([2, 1]) |
m = 1000; r = [99, 123]; y = 25, 49, 64 | r.append(sum(y) % m) | m = 1000; r = [99, 123, 138]; y = (25, 49, 64) |
a = 4; x = 0 | a = x - 1 | a = -1; x = 0 |
t = {'a': {'a': {'b': ..., 'c': ...}}}; w = 'a' | t = t[w] | t = {'a': {'b': Ellipsis, 'c': Ellipsis}}; w = 'a' |
p = 'x'; u = [] | u.append(p) | p = 'x'; u = ['x'] |
h = 3; n = 12; x = [12] | h = x.index(n) | h = 0; n = 12; x = [12] |
g = [97, 0, 7, 1]; w = 0 | g[w] += 1 | g = [98, 0, 7, 1]; w = 0 |
r = 100; y = 40 | r += y | r = 140; y = 40 |
a = [1, 2, 3, 4]; i = 1; j = 0; k = 2; l = [[0, inf, inf, inf, inf], [-2, -2, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf]]; w = -2 | w = l[i][j] + a[i] * (j - (k - j)) | a = [1, 2, 3, 4]; i = 1; j = 0; k = 2; l = [[0, inf, inf, inf, inf], [-2, -2, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf]]; w = -6 |
m = 3; s = 'abc' | s = s[:-m] | m = 3; s = '' |
j = 3; v = 3 | j = j + v | j = 6; v = 3 |
a = ['Harsh', '25', '26.5', '28\n']; d = 'Anurag 26 28 30\n' | a = d.split(' ') | a = ['Anurag', '26', '28', '30\n']; d = 'Anurag 26 28 30\n' |
y = 4; z = 1 | d = y - z | d = 3; y = 4; z = 1 |
w = ['3', '1'] | k = int(w[1]) | k = 1; w = ['3', '1'] |
h = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30)]); k = 'APPLE JUICE'; l = ['APPLE', 'JUICE', '10'] | h[k] = int(l[-1]) | h = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30), ('APPLE JUICE', 10)]); k = 'APPLE JUICE'; l = ['APPLE', 'JUICE', '10'] |
i = 246768; t = 'q' | i ^= 1 << ord(t) - 95 | i = 508912; t = 'q' |
j = 'Sun 10 May 2015 13:54:36 -0000' | f = int(str(j[25:26]) + str(j[28:])) | f = 0; j = 'Sun 10 May 2015 13:54:36 -0000' |
i = 48; o = [0, 9, 27, 63, 135, 158329674399735, 316659348799479, 633318697598967, 1266637395197943, 2533274790395895] | o.append(o[-1] + 9 * 2 ** i) | i = 48; o = [0, 9, 27, 63, 135, 158329674399735, 316659348799479, 633318697598967, 1266637395197943, 2533274790395895, 5066549580791799] |
m = '3 1' | p = [int(x) for x in m.split()] | m = '3 1'; p = [3, 1] |
c = 0; i = 1; n = 5 | c = c * (n + 1 - i) // i | c = 0; i = 1; n = 5 |
f = {1, 2}; p = 3 | f.add(p) | f = {1, 2, 3}; p = 3 |
u = 32 | u = u + 1 | u = 33 |
c = [2, 5, 6]; i = 0; k = [0]; t = 0 | k[i] += (t + 1) * max(c) | c = [2, 5, 6]; i = 0; k = [6]; t = 0 |
d = ['a']; e = 1; p = 'aeiouuoiea' | d.append(p[e]) | d = ['a', 'e']; e = 1; p = 'aeiouuoiea' |
w = [4, 2] | t = w[:] | t = [4, 2]; w = [4, 2] |
e = {(0): [], (1): [], (2): [], (3): []}; i = 4 | e[i] = [] | e = {0: [], 1: [], 2: [], 3: [], 4: []}; i = 4 |
e = 8; i = 8; q = 5 | e = q + i | e = 13; i = 8; q = 5 |
a = 0; i = 6 | a = i | a = 6; i = 6 |
o = 'AAB' | j.append(o) | j = ['AAB']; o = 'AAB' |
y = '0b10001' | l = len(y) | l = 7; y = '0b10001' |
c = 4.768461489617815; l = 5.960464477539063e-08; t = 2 | c *= l % t + 1 | c = 4.768461773840269; l = 5.960464477539063e-08; t = 2 |
h = 1 | h -= 1 | h = 0 |
b = [[1]]; p = 0; q = 0; x = 1 | x = b[q][p] | b = [[1]]; p = 0; q = 0; x = 1 |
h = 'dhck'; j = 3; u = ['c'] | u += [h[j]] | h = 'dhck'; j = 3; u = ['c', 'k'] |
k = ['{', '{', '[']; s = '[' | k.append(s) | k = ['{', '{', '[', '[']; s = '[' |
p = '^[1-9]\\d{5}$'; r = '^[1-9]\\d{5}$' | r = p | p = '^[1-9]\\d{5}$'; r = '^[1-9]\\d{5}$' |
i = 2 | k.append(i) | i = 2; k = [2] |
b = [1, 4, 6, 4] | b.append(1) | b = [1, 4, 6, 4, 1] |
n = 8 | n += 1 | n = 9 |
e = '1' | t = e | e = '1'; t = '1' |
k = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | k = k + [0] | k = [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] |
a = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; c = 1; i = [6, 7, 11]; r = 2 | i.append(a[r][c]) | a = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; c = 1; i = [6, 7, 11, 10]; r = 2 |
j = 1 | f = j | f = 1; j = 1 |
m = [1, 1, 1] | m.append(1) | m = [1, 1, 1, 1] |
i = 1; j = 4; p = 2; r = [[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]] | p = r[i - 1][j - 1] + r[i - 1][j] + r[i - 1][j + 1] + r[i][j] + r[i + 1][j - 1 ] + r[i + 1][j] + r[i + 1][j + 1] | i = 1; j = 4; p = 0; r = [[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]] |
a = 5; i = 4; k = [10, 5, 20, 20, 4, 5, 2, 25, 1] | a = k[i] | a = 4; i = 4; k = [10, 5, 20, 20, 4, 5, 2, 25, 1] |
q = 1; y = 2 | y += q | q = 1; y = 3 |
a = {(2): 5, (1): 4} | y = list(a.items()) | a = {2: 5, 1: 4}; y = [(2, 5), (1, 4)] |
j = 4; k = 'e-d-c-b-a-b-c-d-'; s = 'abcdefghijklmnopqrstuvwxyz' | k += s[j] | j = 4; k = 'e-d-c-b-a-b-c-d-e'; s = 'abcdefghijklmnopqrstuvwxyz' |
i = 20; j = 11; s = 27 | s = j ^ i | i = 20; j = 11; s = 31 |
k = 0; n = {(1): [1, 3, 5], (0): [4, 2]} | n[k].sort() | k = 0; n = {1: [1, 3, 5], 0: [2, 4]} |
j = 33; n = 32.0 | n = float(j) | j = 33; n = 33.0 |
e = 17; i = 18; r = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 16, 1, 19, 0, 20] | e = e ^ r[i] | e = 2; i = 18; r = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 16, 1, 19, 0, 20] |
a = [[0, '-'], [6, 'cd']]; i = 1 | a[i][1] = '-' | a = [[0, '-'], [6, '-']]; i = 1 |
d = 4; i = 4; j = 4; n = 5 | j = (i - d + n) % n | d = 4; i = 4; j = 0; n = 5 |
n = '^[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}$'; p = '^[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}$' | n = p | n = '^[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}$'; p = '^[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}$' |
h = 1; i = 1; j = 3; r = 2 | h, r = i, j | h = 1; i = 1; j = 3; r = 3 |
l = [-3, 7, -2, 3, 5]; s = 0 | s = sum(l) | l = [-3, 7, -2, 3, 5]; s = 10 |
i = 'h'; l = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 2, 'f': 1, 'g': 1} | l[i] = 1 | i = 'h'; l = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 2, 'f': 1, 'g': 1, 'h': 1} |
g = 1; z = 1 | z += g | g = 1; z = 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.