start
stringlengths
5
368
code
stringlengths
5
143
end
stringlengths
5
527
i = 'b'; y = 'a'
i += y
i = 'ba'; y = 'a'
g = 'times'; u = {'two': 1}
u[g] = 1
g = 'times'; u = {'two': 1, 'times': 1}
a = 5; i = 2; p = 3
p = a + i
a = 5; i = 2; p = 7
b = {'a': 2, 'b': 2, 'ab': 2, 'bb': 1, 'abb': 2, 'aabb': 1}; k = 'abb'; n = 3
n += b[k] * (b[k] - 1) // 2
b = {'a': 2, 'b': 2, 'ab': 2, 'bb': 1, 'abb': 2, 'aabb': 1}; k = 'abb'; n = 4
c = [1, 2, 3, 7, 12, 14, 21, 21]; o = 4; q = 7
q = c[o]
c = [1, 2, 3, 7, 12, 14, 21, 21]; o = 4; q = 12
i = 7; s = 'went to the'; w = ['I', 'came', 'from', 'the', 'moon.', 'He', 'went', 'went', 'to', 'the', 'drawing', 'room.', '']
s = ' '.join([w[i], w[i + 1], w[i + 2]])
i = 7; s = 'went to the'; w = ['I', 'came', 'from', 'the', 'moon.', 'He', 'went', 'went', 'to', 'the', 'drawing', 'room.', '']
b = '0'; m = 31
b = '0' * m + b
b = '00000000000000000000000000000000'; m = 31
b = 'wedowhatwemustbecausewecan'; e = 'dowhatwemust'; j = 14
e += b[j]
b = 'wedowhatwemustbecausewecan'; e = 'dowhatwemustb'; j = 14
h = 19; x = [2]
h -= sum(x)
h = 17; x = [2]
i = 16; y = 0
y ^= i
i = 16; y = 16
a = 0; l = [{1, 2}, {0, 2}, {0, 1}]; o = set(); y = {0}
o.update(l[a] - y)
a = 0; l = [{1, 2}, {0, 2}, {0, 1}]; o = {1, 2}; y = {0}
a = 'HackerRank.com presents "Pythonist 2".'; b = ['h', 'A', 'C', 'K', 'E', 'R', 'r', 'A', 'N', 'K', '.']; i = 11
b.append(chr(ord(a[i]) - 32))
a = 'HackerRank.com presents "Pythonist 2".'; b = ['h', 'A', 'C', 'K', 'E', 'R', 'r', 'A', 'N', 'K', '.', 'C']; i = 11
d = 1; t = 6; x = 8
d = abs(x - t)
d = 2; t = 6; x = 8
i = 1; n = ['1', 'or']; y = [['-', '-', '-', '-', '-', 'to'], ['be'], [], ['be'], ['-', 'that'], [ 'question'], [], [], [], [], []]
y[i].append(n[1])
i = 1; n = ['1', 'or']; y = [['-', '-', '-', '-', '-', 'to'], ['be', 'or'], [], ['be'], ['-', 'that'], ['question'], [], [], [], [], []]
i = 4; p = [2, 2, 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]; r = 203; s = [203, 203, 204, 204, 204, 205, 205, 205, 206, 206, 206, 207, 208]
p[s[i] - r] += 1
i = 4; p = [2, 3, 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]; r = 203; s = [203, 203, 204, 204, 204, 205, 205, 205, 206, 206, 206, 207, 208]
j = 11; o = 26; s = 18
s = j ^ o
j = 11; o = 26; s = 17
b = 'd'; i = {'g': 1.0, 'f': 1.0, 'e': 1.0, 'd': 1.0, 'c': 2, 'b': 2, 'a': 2}; z = 3.0
z += i[b]
b = 'd'; i = {'g': 1.0, 'f': 1.0, 'e': 1.0, 'd': 1.0, 'c': 2, 'b': 2, 'a': 2}; z = 4.0
i = 20; k = 0
k ^= i
i = 20; k = 20
i = 7; s = 64
s = 2 ** i
i = 7; s = 128
w = [3, 4, 10, 21, 28, 35, 36, 5]
w.sort()
w = [3, 4, 5, 10, 21, 28, 35, 36]
a = 1; b = 2; j = 1
j, a, b = a, b, b ** 2 + a
a = 2; b = 5; j = 1
a = 2; b = '1100100'; i = 2
a += 2 ** (len(b) - i - 1)
a = 18; b = '1100100'; i = 2
g = ['a']; j = 'a'
g.append(j)
g = ['a', 'a']; j = 'a'
d = {'ive': 0, 'got': 1, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1, 'coconuts': 1}; j = 1; l = ['ive', 'got', 'some', 'coconuts']
d[l[j]] -= 1
d = {'ive': 0, 'got': 0, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1, 'coconuts': 1}; j = 1; l = ['ive', 'got', 'some', 'coconuts']
q = ['12']; v = '1012'
q.append(v)
q = ['12', '1012']; v = '1012'
q = 4
q += 1
q = 5
a = ['1', '42\n']
y.append(int(a[1]))
a = ['1', '42\n']; y = [42]
i = 2; q = [1, 2, 5, 3, 4]
q[i + 1] = q[i]
i = 2; q = [1, 2, 5, 5, 4]
a = 'e'; d = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 2, 'f': 2, 'g': 2}; i = {'a': 1.0, 'b': 1.0, 'c': 1.0, 'd': 1.0}
i[a] = d[a] / 2
a = 'e'; d = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 2, 'f': 2, 'g': 2}; i = {'a': 1.0, 'b': 1.0, 'c': 1.0, 'd': 1.0, 'e': 1.0}
i = '0'; u = '1'
u += str(int(i) ^ 1)
i = '0'; u = '11'
o = [('a',), ('b',), ('b',)]; u = ['dummy', [('a',), ('b',), ('b',)], [('a', 'b'), ('b', 'b')], [('a', 'b', 'b'), ('a', 'b', 'b')], [('a', 'a', 'b', 'b')]]; w = 'a', 'b'
o = u[len(w)]
o = [('a', 'b'), ('b', 'b')]; u = ['dummy', [('a',), ('b',), ('b',)], [('a', 'b'), ('b', 'b')], [('a', 'b', 'b'), ('a', 'b', 'b')], [('a', 'a', 'b', 'b')]]; w = ('a', 'b')
i = 1; y = ['0', '0', '2', '2']
i = int(y[2])
i = 2; y = ['0', '0', '2', '2']
h = 'dbac'; i = 0; j = 2; o = {'db', 'd'}
o.add(h[i:j + 1])
h = 'dbac'; i = 0; j = 2; o = {'db', 'd', 'dba'}
o = ['4', '3']
s = int(o[0])
o = ['4', '3']; s = 4
d = [[0, 9], [], [], [], [1, 8], [], [], [], [2, 7], [], [], [], [], [], [4, 5], [], [], [], [], []]; k = 8; m = [-1, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, - 1, 0, -1, -1, -1, -1, -1]; r = 1
r = max(r, d[k][m[k]])
d = [[0, 9], [], [], [], [1, 8], [], [], [], [2, 7], [], [], [], [], [], [4, 5], [], [], [], [], []]; k = 8; m = [-1, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1]; r = 2
g = 4; i = 3; j = 'ifailuhkqq'; t = 'ailu'
t = j[i:i + g]
g = 4; i = 3; j = 'ifailuhkqq'; t = 'iluh'
a = 'Harsh'; b = '25'; c = '26.5'; d = '28'
u[a] = [float(b), float(c), float(d)]
a = 'Harsh'; b = '25'; c = '26.5'; d = '28'; u = {'Harsh': [25.0, 26.5, 28.0]}
r = 10, 3, 13; w = 9223372036854775807; x = 0
w = r[x] ^ r[x + 1]
r = (10, 3, 13); w = 9; x = 0
f = 1
f = -f
f = -1
m = 4
m -= 1
m = 3
n = {(1): [2], (2): [5, 1], (3): [2], (5): [2, 4, 6], (4): [5], (6): [5]}; z = [2, 3]
n[z[1]].remove(z[0])
n = {1: [2], 2: [5, 1], 3: [], 5: [2, 4, 6], 4: [5], 6: [5]}; z = [2, 3]
c = 'd'; h = 2; k = 'a'
h += abs(ord(k) - ord(c))
c = 'd'; h = 5; k = 'a'
b = '3'; i = ['1', 'xy']
b = i[1]
b = 'xy'; i = ['1', 'xy']
n = 4
j = str(int(n ** n))
j = '256'; n = 4
b = 4; d = 6
b = d
b = 6; d = 6
g = ['1112']; s = '1912'
g.append(s)
g = ['1112', '1912']; s = '1912'
n = '3'; x = '6'
x, n = int(x), int(n)
n = 3; x = 6
i = 1; j = 5
j = i
i = 1; j = 1
a = [2, 4]
e = max(a)
a = [2, 4]; e = 4
k = 3; w = 'abc'
w = w[:-k]
k = 3; w = ''
y = [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, 1, 1]
y[0] = 0
y = [0, 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, 1]
n = ['c', 'cd', 'ccd', 'ccdd', 'd', 'cd', 'dcd', 'c', 'cd', 'd']; x = 6
n[x] = ''.join(sorted(n[x]))
n = ['c', 'cd', 'ccd', 'ccdd', 'd', 'cd', 'cdd', 'c', 'cd', 'd']; x = 6
c = 60; r = 17
c = c - r
c = 43; r = 17
s = 8192
s *= 2
s = 16384
i = 2; j = 1; l = [(4, 2, 1), (3, 2, 2), (4, 3, 1)]; r = 0
r = l[i][j] - l[i][j - 1]
i = 2; j = 1; l = [(4, 2, 1), (3, 2, 2), (4, 3, 1)]; r = -1
i = 4; j = 1
j = i
i = 4; j = 4
i = 3; o = [(1, 10), (2, 7)]; v = 4
o.append((i, v))
i = 3; o = [(1, 10), (2, 7), (3, 4)]; v = 4
e = 1; l = ['4', '.', '5', '4']
l.remove(l[e])
e = 1; l = ['4', '5', '4']
b = [1, 2, 3, 4, 5]
b = [-1] + b + [-1]
b = [-1, 1, 2, 3, 4, 5, -1]
g = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; i = 9; j = 6; r = [6, 11, 25, 48, 60, 110, 80, 60, 0, 0]
r[j] += g[i] - g[j]
g = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; i = 9; j = 6; r = [6, 11, 25, 48, 60, 110, 250, 60, 0, 0]
i = 0; q = [2, 1, 5, 3, 4]
q[i + 1] = q[i]
i = 0; q = [2, 2, 5, 3, 4]
e = 'abdc'; i = 2; w = []
w = list(e[i - 1:])
e = 'abdc'; i = 2; w = ['b', 'd', 'c']
n = 1.0000000000000002e-14; s = 1.1111111111111
s += n % 10
n = 1.0000000000000002e-14; s = 1.11111111111111
h = array([0.99, 0.41, 162.6]); j = array([[0.85, 0.16, 139.75]])
j = h[(newaxis), :]
h = array([ 0.99, 0.41, 162.6 ]); j = array([[ 0.99, 0.41, 162.6 ]])
y = 1
y = y - 1
y = 0
i = 5; k = 4; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; z = 30
z = l[i + k - 1] - l[i]
i = 5; k = 4; l = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; z = 80
i = 2; j = 52
j += i
i = 2; j = 54
j = 18; k = 'whatwemustbecaus'; v = 'dowhatwemustbecausewecan'
k += v[j]
j = 18; k = 'whatwemustbecause'; v = 'dowhatwemustbecausewecan'
f = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144]
f.append(f[-1] + f[-2])
f = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
c = 2
u += c * (c - 1)
c = 2; u = 90
d = [5256, 3216, 8740]; m = 95; p = 95
d.append(m * p)
d = [5256, 3216, 8740, 9025]; m = 95; p = 95
s = 0; w = 3
s = w
s = 3; w = 3
f = 0.12; x = 1.2
x = f % 10.0
f = 0.12; x = 0.12
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, 0, 0]; j = 3; k = 0; s = 'abcd'
d[ord(s[j + k]) - 97] += 1
d = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; j = 3; k = 0; s = 'abcd'
i = 1; k = 'gurwgrb'; s = 'g'
s = s + k[i]
i = 1; k = 'gurwgrb'; s = 'gu'
h = 2; j = 1; n = 2
h += n - j
h = 3; j = 1; n = 2
f = [2, 1, 2]; j = 0
f = [j + 1]
f = [1]; j = 0
d = 2; y = 1
y = max(y, d)
d = 2; y = 2
d = ['2', '5', '100']; q = 1
q = int(d[1]) - 1
d = ['2', '5', '100']; q = 4
g = 3; l = '3'; s = '3'; z = 1
l = s[g:g + z]
g = 3; l = ''; s = '3'; z = 1
a = {(0): 0, (1): 1, (2): 1, (3): 2, (4): 3, (7): 13, (8): 21}; i = 8; n = 4
o = a[i - 1] - n
a = {0: 0, 1: 1, 2: 1, 3: 2, 4: 3, 7: 13, 8: 21}; i = 8; n = 4; o = 9
w = 4
o = w - 1
o = 3; w = 4
f = 5; o = [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2]; p = 2
o[f] += o[p]
f = 5; o = [1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 2]; p = 2
i = 8
i >>= 1
i = 4
i = 6; m = 4; r = 9
r = m + i
i = 6; m = 4; r = 10
r = 25
r += 1
r = 26
c = {'ive': 1, 'got': 1, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1, 'coconuts': 1}; w = 'ive'
c[w] -= 1
c = {'ive': 0, 'got': 1, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1, 'coconuts': 1}; w = 'ive'
i = 4; m = [(1, 10)]; v = 8
m.append((i, v))
i = 4; m = [(1, 10), (4, 8)]; v = 8
c = 4; i = 0; j = 2; s = 'haveaniceday'; t = 'a'
t = s[c * j + i]
c = 4; i = 0; j = 2; s = 'haveaniceday'; t = 'e'
a = '('; q = ['{', '{', '[', '[', '(']
a = q.pop()
a = '('; q = ['{', '{', '[', '[']
a = 593773704; v = 715739056
v *= a
a = 593773704; v = 424987030378583424
j = 114
j = j - 1
j = 113
b = 206; s = {(203): 1, (204): 2, (205): 1}
s[b] = 1
b = 206; s = {203: 1, 204: 2, 205: 1, 206: 1}
d = 600; i = 4; r = [100, 200, 100, 500, 1200, 600]; x = 400
d = abs(x - r[i])
d = 800; i = 4; r = [100, 200, 100, 500, 1200, 600]; x = 400
d = [203, 204, 204, 205, 206, 207]; i = '205'
d.append(int(float(i)))
d = [203, 204, 204, 205, 206, 207, 205]; i = '205'
j = 'c'
c += j
c = 'bhvnJ85Ic'; j = 'c'
m = {'c': 2, 'd': 2, 'cd': 1}; q = 'cd'
m[q] = m.get(q, 0) + 1
m = {'c': 2, 'd': 2, 'cd': 2}; q = 'cd'
t = 1.7999999999999993e-69
t = t / 10
t = 1.7999999999999994e-70
j = ['Tsi', 'h%x', 'i #']; l = 'sM '
j.append(l)
j = ['Tsi', 'h%x', 'i #', 'sM ']; l = 'sM '
b = -3620601; i = 4; m = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819]
b = m[i]
b = -357920; i = 4; m = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819]