start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
i = 1; u = 2.0 | i = u | i = 2.0; u = 2.0 |
l = []; m = ['insert', '0', '5'] | l.insert(int(m[1]), int(m[2])) | l = [5]; m = ['insert', '0', '5'] |
h = {1, 2}; i = 2 | h.add(2 ** i) | h = {1, 2, 4}; i = 2 |
s = 9; v = [9] | v.remove(s) | s = 9; v = [] |
i = 0; j = [True, False]; w = [2, 4] | j = [False for i in range(len(w))] | i = 0; j = [False, False]; w = [2, 4] |
b = 2; f = 0; k = [(1, 0)]; o = {(0, 0): [(1, 0)]} | k.append(tuple([b, f])) | b = 2; f = 0; k = [(1, 0), (2, 0)]; o = {(0, 0): [(1, 0)]} |
x = [2, 4, 5, 6, 7, 9, 11, 12] | w = x[0] | w = 2; x = [2, 4, 5, 6, 7, 9, 11, 12] |
i = 2; l = ['h', 'A', 'c', 'k', 'e', 'r', 'R', 'a', 'n', 'k', 'o', 'n', 'i', 's', 't', ' ', '2', '"', '.'] | l[i] = l[i].upper() | i = 2; l = ['h', 'A', 'C', 'k', 'e', 'r', 'R', 'a', 'n', 'k', 'o', 'n', 'i', 's', 't', ' ', '2', '"', '.'] |
b = 1; f = 4; u = 3 | b = u % f | b = 3; f = 4; u = 3 |
i = 1; j = 2; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200, 0]; n = 3; y = 1 | n += (l[i + 1] - l[i]) * (j + j * y) | i = 1; j = 2; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200, 0]; n = 7; y = 1 |
c = 9; h = 3; r = 5; w = 9 | w = c - r ** h | c = 9; h = 3; r = 5; w = -116 |
x = -1 | x += 1 | x = 0 |
r = ( 'In the third category he included those Brothers (the majority) who saw nothing in Freemasonry but ' ); x = 'the' | r += x + ' ' | r = 'In the third category he included those Brothers (the majority) who saw nothing in Freemasonry but the '; x = 'the' |
w = 999100010 | w += 1 | w = 999100011 |
i = 9 | i = i + 1 | i = 10 |
k = 2 | j = k - 1 | j = 1; k = 2 |
a = 1; i = 11; l = 0; o = [[3, 0, 8, 12], [2, 0, 0, 16], [1, 0, 0, 15], [5, 9, 13, 14]]; t = deque([3, 2, 1, 5, 9, 13, 14, 15, 16, 12, 8, 4]) | o[l][a] = t[i] | a = 1; i = 11; l = 0; o = [[3, 4, 8, 12], [2, 0, 0, 16], [1, 0, 0, 15], [5, 9, 13, 14]]; t = deque([3, 2, 1, 5, 9, 13, 14, 15, 16, 12, 8, 4]) |
d = ['1', '2', '1'] | a = d.pop() | a = '1'; d = ['1', '2'] |
i = 1; j = 1; m = '12' | j = len(m) - i - 1 | i = 1; j = 0; m = '12' |
x = 1; y = 3 | u.append(abs(x - y)) | u = [2]; x = 1; y = 3 |
f = 4; n = 3 | f *= n | f = 12; n = 3 |
q = 0; x = 203 | a[x] = q + 1 | a = {203: 1}; q = 0; x = 203 |
l = '99' | l = str(int(l) + 1) | l = '100' |
e = '10001'; s = '999100010001'; w = 2 | e = s[w:] | e = '9100010001'; s = '999100010001'; w = 2 |
a = 3; q = [5, 5] | r = q[1] - a | a = 3; q = [5, 5]; r = 2 |
c = [2, 3, 4]; d = 9; j = 2 | d -= c[j] | c = [2, 3, 4]; d = 5; j = 2 |
i = 3; p = {'b', 'a', 'c'}; s = 'abcd' | p.add(s[i]) | i = 3; p = {'a', 'b', 'c', 'd'}; s = 'abcd' |
r = 6; x = 5 | r = r * x | r = 30; x = 5 |
d = 25; x = {(63): 1, (25): 1, (73): 2, (1): 1, (98): 1, (56): 1, (84): 1, (86): 1, (57): 1, (16): 1, (83): 1, (8): 1} | x[d] += 1 | d = 25; x = {63: 1, 25: 2, 73: 2, 1: 1, 98: 1, 56: 1, 84: 1, 86: 1, 57: 1, 16: 1, 83: 1, 8: 1} |
b = '6'; c = '11'; s = '9' | b, s, c = [int(b), int(s), int(c)] | b = 6; c = 11; s = 9 |
i = 1; j = 2; o = [3, 1]; p = 3; t = [5, 2, 8] | p = o[i] + t[j] | i = 1; j = 2; o = [3, 1]; p = 9; t = [5, 2, 8] |
q = 6 | q += 1 | q = 7 |
i = 8; p = [2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; v = 'aabbccddeefghi' | p[ord(v[i]) - 97] += 1 | i = 8; p = [2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; v = 'aabbccddeefghi' |
n = 2; z = 2 | z = n * (n - 1) | n = 2; z = 2 |
n = 'a'; 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[ord(n) - 97] += 1 | n = 'a'; 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] |
i = 1; j = 1; n = [['T', 's', 'i'], ['h', '%', 'x'], ['i', ' ', '#'], ['$', 'a', ' '], [ '#', 't', '%'], ['i', 'r', '!']]; r = 'This$#is' | r += n[i][j] | i = 1; j = 1; n = [['T', 's', 'i'], ['h', '%', 'x'], ['i', ' ', '#'], ['$', 'a', ' '], ['#', 't', '%'], ['i', 'r', '!']]; r = 'This$#is%' |
a = [0.92, 0.11, 137.66]; i = 2; y = array([109.85, 155.72, 0.0, 0.0, 0.0, 0.0]) | y[i] = a[-1] | a = [0.92, 0.11, 137.66]; i = 2; y = array([109.85, 155.72, 137.66, 0. , 0. , 0. ]) |
h = 19.0; i = 3; o = [[0, 2, 1, 3, 4], [2, 1, 0, 3, 4], [1, 2, 3, 0, 4], [1], []]; y = [[10.0, 30.0, 20.0, 40.0, 50.0], [11.0, 9.0, 5.0, 19.0, 29.0], [21.0, 9.0, 15.0, 19.0, 39.0], [91.0, 9.0, 75.0, 19.0, 89.0], [81.0, 99.0, 55.0, 59.0, 89.0]] | o[i].append(y[i].index(h)) | h = 19.0; i = 3; o = [[0, 2, 1, 3, 4], [2, 1, 0, 3, 4], [1, 2, 3, 0, 4], [1, 3], []]; y = [[10.0, 30.0, 20.0, 40.0, 50.0], [11.0, 9.0, 5.0, 19.0, 29.0], [21.0, 9.0, 15.0, 19.0, 39.0], [91.0, 9.0, 75.0, 19.0, 89.0], [81.0, 99.0, 55.0, 59.0, 89.0]] |
e = [2, 2, 2, 2, 2, 1, 1, 1, 1] | c = min(e) | c = 1; e = [2, 2, 2, 2, 2, 1, 1, 1, 1] |
j = 3; s = 2 | s = j | j = 3; s = 3 |
i = 1; j = 8; s = 'ifailuhkqq'; x = ['i', 'fi', 'afi', 'afii', 'afiil', 'afiilu', 'af', 'afi', 'afil', 'afilu', 'afhilu', 'afhiklu'] | x.append(''.join(sorted(s[i:j + 1]))) | i = 1; j = 8; s = 'ifailuhkqq'; x = ['i', 'fi', 'afi', 'afii', 'afiil', 'afiilu', 'af', 'afi', 'afil', 'afilu', 'afhilu', 'afhiklu', 'afhiklqu'] |
k = 1; m = 0; x = 0 | u += str(m + 1 + k + 2 * x * k) + ' ' | k = 1; m = 0; u = '9V65Lqz2 '; x = 0 |
f = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521]; x = 1600 | f.append(x) | f = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600]; x = 1600 |
q = 1; s = [3] | q = min(s) | q = 3; s = [3] |
m = {(2): ['a', 'b', 'c', 'f', 'g', 'h'], (3): ['e']} | l = list(m.items()) | l = [(2, ['a', 'b', 'c', 'f', 'g', 'h']), (3, ['e'])]; m = {2: ['a', 'b', 'c', 'f', 'g', 'h'], 3: ['e']} |
b = 0.0; s = 0.00032 | b += s | b = 0.00032; s = 0.00032 |
i = 3; u = [1, 3] | u.append(i) | i = 3; u = [1, 3, 3] |
c = 6 | c = c % 5 | c = 1 |
a = [[2, 2, 0, 0], [0, 2, 2, 0], [0, 0, 1, 0], [1, 0, 0, 0]]; x = 2; y = 2 | a[x][y] = 2 | a = [[2, 2, 0, 0], [0, 2, 2, 0], [0, 0, 2, 0], [1, 0, 0, 0]]; x = 2; y = 2 |
k = 'U'; q = -2 | q += 1 if k.upper() == 'U' else -1 | k = 'U'; q = -1 |
c = [[1, 1, 0, 0]]; j = [0, 1, 1, 0] | c.append(j) | c = [[1, 1, 0, 0], [0, 1, 1, 0]]; j = [0, 1, 1, 0] |
r = {'a': 2, 'b': 2, 'c': 2}; s = 'd' | r[s] = 1 | r = {'a': 2, 'b': 2, 'c': 2, 'd': 1}; s = 'd' |
s = 6.0; u = 4 | s = s / u + 1 | s = 2.5; u = 4 |
o = 1212; x = ['523', '3', '11'] | o = int(''.join([x[0]] * int(x[1]))) | o = 523523523; x = ['523', '3', '11'] |
u = 'a'; x = {'a': 1, 'e': 2, 'i': 2, 'o': 2, 'u': 2} | x[u] += 1 | u = 'a'; x = {'a': 2, 'e': 2, 'i': 2, 'o': 2, 'u': 2} |
i = ['a', 'b', 'c', 'd', 'e', 'f']; u = 6 | i.append(chr(ord('a') + u)) | i = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; u = 6 |
a = ['a', 'b']; d = 1 | d = len(a) | a = ['a', 'b']; d = 2 |
m = {(0): {1}, (1): {0}, (2): {3}, (3): {2}, (4): set()}; x = 0; y = 4 | m[x].add(y) | m = {0: {1, 4}, 1: {0}, 2: {3}, 3: {2}, 4: set()}; x = 0; y = 4 |
e = ['APPLE JUICE', '10']; h = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30)]) | h[e[0]] = int(e[1]) | e = ['APPLE JUICE', '10']; h = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30), ('APPLE JUICE', 10)]) |
x = 10 | y.append(x) | x = 10; y = [10] |
i = 1; k = 4; l = 3; q = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200] | l = q[i + k - 1] - q[i] | i = 1; k = 4; l = 8; q = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200] |
h = '61' | i = 3 if len(h) > 3 else len(h) | h = '61'; i = 2 |
a = [-3916237, -3620601]; i = 5; r = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819] | a = [r[i], r[i + 1]] | a = [-20, 30]; i = 5; r = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819] |
f = 9 | f -= 3 | f = 6 |
a = [1, 3, 1, 2]; h = [0, 3, 2, 2]; j = 0 | h[j] = max(h[j + 1], a[j]) | a = [1, 3, 1, 2]; h = [3, 3, 2, 2]; j = 0 |
b = [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, 0, 0]; j = 4 | b[-j] = 0 | b = [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, 0, 0, 0]; j = 4 |
k = 0; n = 1; u = 'aaaaabbbbaaaa' | p = u[k:n] | k = 0; n = 1; p = 'a'; u = 'aaaaabbbbaaaa' |
d = 1; k = 3; n = ['1', '4'] | d, k = [int(n[0]), int(n[1])] | d = 1; k = 4; n = ['1', '4'] |
i = 11735; u = 64630 | u += i | i = 11735; u = 76365 |
d = [2, 5, 4, 5, 2] | m = max(d) | d = [2, 5, 4, 5, 2]; m = 5 |
r = ( 'In the third category he included those Brothers... who saw nothing in Freemasonry but the external ' ); x = 'forms' | r += x + ' ' | r = 'In the third category he included those Brothers... who saw nothing in Freemasonry but the external forms '; x = 'forms' |
g = 1; v = 1; x = '1001'; y = '7891011' | x = y[v:v + g] | g = 1; v = 1; x = '8'; y = '7891011' |
d = 7 | d = float(d) | d = 7.0 |
d = 0.14159265358979312; l = 5; t = 14; u = 3.141592653589793 | d = abs(u - float(t) / float(l)) | d = 0.3415926535897933; l = 5; t = 14; u = 3.141592653589793 |
d = deque([2, 3, 4, 5, 1]) | d.rotate(-1) | d = deque([3, 4, 5, 1, 2]) |
h = 5; i = 2 | h = i * 2 + 3 | h = 7; i = 2 |
l = ['GGGGGG', 'GBBBGB', 'GGGGGG', 'GGBBGB']; v = 'GGGGGG' | l.append(v) | l = ['GGGGGG', 'GBBBGB', 'GGGGGG', 'GGBBGB', 'GGGGGG']; v = 'GGGGGG' |
k = 1 | k -= 1 | k = 0 |
i = 0; k = 2; n = [1, 1, 1, 2, 2] | l.append(n[i + k - 1] - n[i]) | i = 0; k = 2; l = [0]; n = [1, 1, 1, 2, 2] |
d = -1; i = 2 | d = i - 1 | d = 1; i = 2 |
m = 3; w = ['h', 'e', 'f', 'g']; x = 2 | w[x], w[m] = w[m], w[x] | m = 3; w = ['h', 'e', 'g', 'f']; x = 2 |
k = 13; x = 1 | x = k % 10 | k = 13; x = 3 |
b = 8; g = 1; i = {(7): 1, (8): 1, (9): 1} | g += i[b] | b = 8; g = 2; i = {7: 1, 8: 1, 9: 1} |
s = {'a': 1, 'ab': 1, 'abb': 1}; x = 'aabb' | s[x] = 1 | s = {'a': 1, 'ab': 1, 'abb': 1, 'aabb': 1}; x = 'aabb' |
a = 'a'; b = '2'; f = ['a', '1'] | a, b = [xx for xx in f] | a = 'a'; b = '1'; f = ['a', '1'] |
i = 'm'; y = 'hACKERrANK.CO' | y = y + i.upper() | i = 'm'; y = 'hACKERrANK.COM' |
a = 1; j = 40; n = 2; t = -37 | t = a * n - j | a = 1; j = 40; n = 2; t = -38 |
a = 'a'; b = 'e'; w = ['a', 'f'] | a, b = w | a = 'a'; b = 'f'; w = ['a', 'f'] |
a = -10000000000; b = 30; i = 1; y = [-10000000000, 30, 38, 48, 50, 60, 10000000000] | a, b = y[i], y[i + 1] | a = 30; b = 38; i = 1; y = [-10000000000, 30, 38, 48, 50, 60, 10000000000] |
i = 16; p = 'hACKERrANK.COM P'; s = 'HackerRank.com presents "Pythonist 2".' | p = p + s[i].upper() | i = 16; p = 'hACKERrANK.COM PR'; s = 'HackerRank.com presents "Pythonist 2".' |
i = {'5', '9'}; s = {'12', '11'} | q = i.union(s) | i = {'9', '5'}; q = {'9', '5', '11', '12'}; s = {'11', '12'} |
j = 1; k = 2; z = [1, 3, 2, 4, 5] | k = z[j] | j = 1; k = 3; z = [1, 3, 2, 4, 5] |
j = 10 | v.append(j) | j = 10; v = [10] |
f = [20, 110]; j = 100; r = 100 | f.append(r + j) | f = [20, 110, 200]; j = 100; r = 100 |
k = 1048576; n = {(256): 2, (32): 1, (1): 1, (2048): 1} | n[k] = 1 | k = 1048576; n = {256: 2, 32: 1, 1: 1, 2048: 1, 1048576: 1} |
c = 4 | a = [0, c] | a = [0, 4]; c = 4 |
a = [1, 1, 1, 0]; b = [1, 0, 0, 1]; p = [1, 1, 0, 0]; r = 1000000007 | p[2] = (a[2] * b[0] + a[3] * b[2]) % r | a = [1, 1, 1, 0]; b = [1, 0, 0, 1]; p = [1, 1, 1, 0]; r = 1000000007 |
c = 0, 1; i = 0; j = 0 | i, j = c | c = (0, 1); i = 0; j = 1 |
c = 'b', 'a' | n.append(c) | c = ('b', 'a'); n = [('b', '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 = 0; s = 'abcdefghijklmnopqrstuvwxyz' | d[s[i]] = h[i] | d = {'a': 1}; 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 = 0; s = 'abcdefghijklmnopqrstuvwxyz' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.