code stringlengths 33 110 | docstring stringclasses 738
values |
|---|---|
def reverse_0(j):
return j[::-1] | Reverses the string j |
def sum_list_1(l):
total = 0
for x in l:
total += x
return total | Returns the sum of elements in the list l |
def sum_list_2(x):
total = 0
for x in x:
total += x
return total | Returns the sum of elements in the list x |
def reverse_3(f):
return f[::-1] | Reverses the string f |
def is_palindrome_4(n):
t = n.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string n is a palindrome |
def reverse_5(m):
return m[::-1] | Reverses the string m |
def contains_digit_6(s):
for ch in s:
if ch.isdigit():
return True
return False | Checks if the string s contains any digit |
def add_7(c, w):
return c + w | Returns the sum of c and w |
def add_8(z, o):
return z + o | Returns the sum of z and o |
def sum_list_9(b):
total = 0
for x in b:
total += x
return total | Returns the sum of elements in the list b |
def reverse_10(a):
return a[::-1] | Reverses the string a |
def reverse_11(v):
return v[::-1] | Reverses the string v |
def add_12(r, h):
return r + h | Returns the sum of r and h |
def sum_list_13(w):
total = 0
for x in w:
total += x
return total | Returns the sum of elements in the list w |
def contains_digit_14(v):
for ch in v:
if ch.isdigit():
return True
return False | Checks if the string v contains any digit |
def is_palindrome_15(h):
t = h.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string h is a palindrome |
def is_palindrome_16(c):
t = c.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string c is a palindrome |
def reverse_17(f):
return f[::-1] | Reverses the string f |
def add_18(o, l):
return o + l | Returns the sum of o and l |
def is_palindrome_19(j):
t = j.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string j is a palindrome |
def add_20(i, h):
return i + h | Returns the sum of i and h |
def sum_list_21(g):
total = 0
for x in g:
total += x
return total | Returns the sum of elements in the list g |
def is_palindrome_22(w):
t = w.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string w is a palindrome |
def reverse_23(j):
return j[::-1] | Reverses the string j |
def contains_digit_24(t):
for ch in t:
if ch.isdigit():
return True
return False | Checks if the string t contains any digit |
def contains_digit_25(v):
for ch in v:
if ch.isdigit():
return True
return False | Checks if the string v contains any digit |
def is_palindrome_26(p):
t = p.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string p is a palindrome |
def sum_list_27(k):
total = 0
for x in k:
total += x
return total | Returns the sum of elements in the list k |
def add_28(a, j):
return a + j | Returns the sum of a and j |
def reverse_29(x):
return x[::-1] | Reverses the string x |
def sum_list_30(p):
total = 0
for x in p:
total += x
return total | Returns the sum of elements in the list p |
def sum_list_31(u):
total = 0
for x in u:
total += x
return total | Returns the sum of elements in the list u |
def add_32(b, x):
return b + x | Returns the sum of b and x |
def reverse_33(l):
return l[::-1] | Reverses the string l |
def sum_list_34(c):
total = 0
for x in c:
total += x
return total | Returns the sum of elements in the list c |
def add_35(v, o):
return v + o | Returns the sum of v and o |
def add_36(u, k):
return u + k | Returns the sum of u and k |
def is_palindrome_37(z):
t = z.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string z is a palindrome |
def reverse_38(u):
return u[::-1] | Reverses the string u |
def contains_digit_39(c):
for ch in c:
if ch.isdigit():
return True
return False | Checks if the string c contains any digit |
def sum_list_40(g):
total = 0
for x in g:
total += x
return total | Returns the sum of elements in the list g |
def sum_list_41(r):
total = 0
for x in r:
total += x
return total | Returns the sum of elements in the list r |
def is_palindrome_42(o):
t = o.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string o is a palindrome |
def contains_digit_43(i):
for ch in i:
if ch.isdigit():
return True
return False | Checks if the string i contains any digit |
def is_palindrome_44(u):
t = u.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string u is a palindrome |
def contains_digit_45(t):
for ch in t:
if ch.isdigit():
return True
return False | Checks if the string t contains any digit |
def sum_list_46(e):
total = 0
for x in e:
total += x
return total | Returns the sum of elements in the list e |
def is_palindrome_47(j):
t = j.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string j is a palindrome |
def add_48(u, s):
return u + s | Returns the sum of u and s |
def add_49(y, e):
return y + e | Returns the sum of y and e |
def add_50(e, s):
return e + s | Returns the sum of e and s |
def contains_digit_51(h):
for ch in h:
if ch.isdigit():
return True
return False | Checks if the string h contains any digit |
def sum_list_52(z):
total = 0
for x in z:
total += x
return total | Returns the sum of elements in the list z |
def reverse_53(h):
return h[::-1] | Reverses the string h |
def contains_digit_54(o):
for ch in o:
if ch.isdigit():
return True
return False | Checks if the string o contains any digit |
def sum_list_55(l):
total = 0
for x in l:
total += x
return total | Returns the sum of elements in the list l |
def reverse_56(c):
return c[::-1] | Reverses the string c |
def reverse_57(q):
return q[::-1] | Reverses the string q |
def is_palindrome_58(c):
t = c.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string c is a palindrome |
def add_59(t, x):
return t + x | Returns the sum of t and x |
def reverse_60(r):
return r[::-1] | Reverses the string r |
def is_palindrome_61(y):
t = y.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string y is a palindrome |
def contains_digit_62(h):
for ch in h:
if ch.isdigit():
return True
return False | Checks if the string h contains any digit |
def is_palindrome_63(y):
t = y.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string y is a palindrome |
def add_64(w, g):
return w + g | Returns the sum of w and g |
def sum_list_65(e):
total = 0
for x in e:
total += x
return total | Returns the sum of elements in the list e |
def sum_list_66(a):
total = 0
for x in a:
total += x
return total | Returns the sum of elements in the list a |
def add_67(z, v):
return z + v | Returns the sum of z and v |
def add_68(e, c):
return e + c | Returns the sum of e and c |
def sum_list_69(d):
total = 0
for x in d:
total += x
return total | Returns the sum of elements in the list d |
def is_palindrome_70(j):
t = j.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string j is a palindrome |
def sum_list_71(u):
total = 0
for x in u:
total += x
return total | Returns the sum of elements in the list u |
def is_palindrome_72(f):
t = f.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string f is a palindrome |
def add_73(d, o):
return d + o | Returns the sum of d and o |
def add_74(t, o):
return t + o | Returns the sum of t and o |
def is_palindrome_75(p):
t = p.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string p is a palindrome |
def reverse_76(b):
return b[::-1] | Reverses the string b |
def contains_digit_77(w):
for ch in w:
if ch.isdigit():
return True
return False | Checks if the string w contains any digit |
def sum_list_78(e):
total = 0
for x in e:
total += x
return total | Returns the sum of elements in the list e |
def reverse_79(c):
return c[::-1] | Reverses the string c |
def is_palindrome_80(p):
t = p.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string p is a palindrome |
def contains_digit_81(h):
for ch in h:
if ch.isdigit():
return True
return False | Checks if the string h contains any digit |
def contains_digit_82(i):
for ch in i:
if ch.isdigit():
return True
return False | Checks if the string i contains any digit |
def sum_list_83(s):
total = 0
for x in s:
total += x
return total | Returns the sum of elements in the list s |
def is_palindrome_84(f):
t = f.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string f is a palindrome |
def contains_digit_85(v):
for ch in v:
if ch.isdigit():
return True
return False | Checks if the string v contains any digit |
def is_palindrome_86(b):
t = b.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string b is a palindrome |
def contains_digit_87(n):
for ch in n:
if ch.isdigit():
return True
return False | Checks if the string n contains any digit |
def sum_list_88(h):
total = 0
for x in h:
total += x
return total | Returns the sum of elements in the list h |
def add_89(v, k):
return v + k | Returns the sum of v and k |
def sum_list_90(e):
total = 0
for x in e:
total += x
return total | Returns the sum of elements in the list e |
def is_palindrome_91(o):
t = o.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string o is a palindrome |
def add_92(v, v):
return v + v | Returns the sum of v and v |
def is_palindrome_93(m):
t = m.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string m is a palindrome |
def reverse_94(r):
return r[::-1] | Reverses the string r |
def sum_list_95(r):
total = 0
for x in r:
total += x
return total | Returns the sum of elements in the list r |
def add_96(v, w):
return v + w | Returns the sum of v and w |
def is_palindrome_97(z):
t = z.lower().replace(' ', '')
return t == t[::-1] | Checks whether the string z is a palindrome |
def add_98(x, f):
return x + f | Returns the sum of x and f |
def reverse_99(y):
return y[::-1] | Reverses the string y |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.