prompt stringlengths 14 2.1k | completion stringlengths 0 10.3k | concept stringclasses 200
values |
|---|---|---|
<?code x = True?><?code y = False?><?code z = 1?><?code w = 0?> | <?print x and z?><?print x and w?><?print y and z?><?print y and w?> | Boolean "and" operator |
<?code x = True?><?code y = False?><?code z = True?> | <?print x and y and z?> | Boolean "and" operator |
<?code x = 1?><?code y = 0?><?code z = 'hello'?><?code w = None?> | <?print x and y and z?><?print x and z and w?> | Boolean "and" operator |
<?code x = 'apple'?><?code y = 'banana'?><?code z = ''?> | <?print x and y?><?print x and z?><?print z and x?> | Boolean "and" operator |
<?code x = True?><?code y = 'hello'?><?code z = 0?><?code w = []?> | <?print x and y and z and w?> | Boolean "and" operator |
<?code x = True?><?code y = False?><?code z = 1?><?code w = 0?><?code a = 'hello'?><?code b = ''?> | <?print x and a?><?print x and b?><?print y and a?><?print z and a?><?print w and b?> | Boolean "and" operator |
<?code x = True?><?code y = False?><?code z = None?><?code a = 1?><?code b = 0?><?code c = 'hello'?><?code d = ''?> | <?print x and a and c?><?print x and b and c?><?print x and a and d?><?print y and a and c?><?print x and z?> | Boolean "and" operator |
<?code x = False?><?code y = True?><?code z = False?> | <?print x or y or z?> | Boolean "or" operator |
<?code x = False?><?code y = True?><?code z = 'hello'?><?code w = ''?> | <?print x or y?><?print x or z?><?print x or w?><?print y or z?><?print y or w?> | Boolean "or" operator |
<?code x = False?><?code y = False?><?code z = True?><?code w = False?> | <?print x or y or z or w?> | Boolean "or" operator |
<?code x = False?><?code y = 'hello'?><?code z = 'world'?> | <?print x or y or z?> | Boolean "or" operator |
<?code x = False?><?code y = True?><?code z = False?><?code w = 'hello'?><?code v = 'world'?> | <?print (x or y) or (z or w or v)?> | Boolean "or" operator |
<?code x = True?><?code y = False?><?code z = Undefined?> | <?print x or y or z?> | Boolean "or" operator |
<?code x = False?><?code y = False?><?code z = False?><?code w = True?> | <?print x or y or z or w?> | Boolean "or" operator |
<?code x = False?><?code y = 0?><?code z = ''?><?code w = []?> | <?print x or y or z or w?> | Boolean "or" operator |
<?code x = True?><?code y = 'hello'?><?code z = False?> | <?print x or y or z?> | Boolean "or" operator |
<?code x = False?><?code y = True?><?code z = False?> | <?print x or y or z?> | Boolean "or" operator |
<?code x = {}?><?code x.foo = 42?><?code y = x.bar?> | <?print isundefined(y)?> | isundefined |
<?code x = {1: 'one', 2: 'two'}?><?code y = x.get(3)?> | <?print isundefined(y)?> | isundefined |
<?code x = {'a': 1, 'b': 2}?><?code y = x.get('c', None)?><?if isundefined(y)?> | undefined<?else?>defined<?end if?> | isundefined |
<?code x = {'a': 1, 'b': 2}?><?code y = x.get('c')?><?code z = x.get('a')?> | <?if isundefined(y)?>y is undefined<?else?>y is defined<?end if?><?if isundefined(z)?>z is undefined<?else?>z is defined<?end if?> | isundefined |
<?code x = {}?><?code y = x.c?> | <?print isundefined(y)?> | isundefined |
<?code x = [1, 2, 3]?><?code y = x[3]?> | <?if isundefined(y)?>y is undefined<?else?>y is defined<?end if?> | isundefined |
<?code x = {'a': 1}?><?code y = x.b?><?code z = chr(97)?> | <?print isundefined(y)?><?print isundefined(z)?> | isundefined |
<?code x = {'a': 1, 'b': 2}?><?code y = x.get('c', None)?> | <?print isundefined(y)?> | isundefined |
<?code x = {}?><?code y = x.get('missing_key')?> | <?if isundefined(y)?>Key is missing<?else?>Key exists<?end if?> | isundefined |
<?code x = {'a': 1, 'b': None}?> | <?if isdefined(x.a)?>a is defined<?end if?><?if isdefined(x.b)?>b is defined<?end if?><?if isdefined(x.c)?>c is defined<?end if?> | isdefined |
<?code x = None?><?code y = 123?><?code z = 'abc'?><?code a = []?><?code b = {'key': 'value'}?> | <?print isdefined(x)?><?print isdefined(y)?><?print isdefined(z)?><?print isdefined(a)?><?print isdefined(b)?> | isdefined |
<?code x = []?><?code y = {'a': 1}?> | <?if isdefined(x)?>x is defined<?else?>x is not defined<?end if?><?if isdefined(y.a)?>y.a is defined<?else?>y.a is not defined<?end if?><?if isdefined(y.b)?>y.b is defined<?else?>y.b is not defined<?end if?> | isdefined |
<?code a = {'b': True, 'c': False}?><?code d = 1?><?code e = 'f'?> | <?print isdefined(a)?><?print isdefined(a.b)?><?print isdefined(a.g)?><?print isdefined(d)?><?print isdefined(e)?> | isdefined |
<?code x = Undefined?><?code y = None?> | <?print isdefined(x)?><?print isdefined(y)?> | isdefined |
<?code foo = {'bar': 1, 'baz': None}?> | <?if isdefined(foo.bar)?>bar is defined<?end if?><?if isdefined(foo.baz)?>baz is defined<?end if?><?if isdefined(foo.qux)?>qux is defined<?end if?> | isdefined |
<?code a = None?><?code b = 1?><?code c = 'test'?> | <?if isnone(a)?>a is None<?else?>a is not None<?end if?><?if isnone(b)?>b is None<?else?>b is not None<?end if?><?if isnone(c)?>c is None<?else?>c is not None<?end if?> | isnone |
<?code a = None?><?code b = False?> | <?print isnone(a)?><?print isnone(b)?> | isnone |
<?code a = None?><?code b = "string"?><?code c = 42?><?code d = []?><?code e = {}?><?code f = False?> | <?print isnone(a)?>
<?print isnone(b)?>
<?print isnone(c)?>
<?print isnone(d)?>
<?print isnone(e)?>
<?print isnone(f)?> | isnone |
<?code a = None?><?code b = None?><?code c = None?> | <?if isnone(a) and isnone(b) and isnone(c)?>All are None<?else?>Not all are None<?end if?> | isnone |
<?code a = {'x': None, 'y': 1}?> | <?if isnone(a.x)?>x is None<?else?>x is not None<?end if?>
<?if isnone(a.y)?>y is None<?else?>y is not None<?end if?> | isnone |
<?code a = [None, 1, "hello", None]?> | <?for x in a?><?if isnone(x)?>None<?else?><?print x?><?end if?><?end for?> | isnone |
<?code a = {1: None, 2: "two", 3: None}?> | <?for i in a.keys()?><?if isnone(a[i])?><?print i?> is None, <?else?><?print i?> is <?print a[i]?>, <?end if?><?end for?> | isnone |
<?code x = None?><?code y = 1?> | <?if isnone(x)?>x is None<?end if?><?if not isnone(y)?>y is not None<?end if?> | isnone |
<?code x = None?><?code y = "string"?> | <?if isnone(x)?>x is None<?else?>x is not None<?end if?><?if isnone(y)?>y is None<?else?>y is not None<?end if?> | isnone |
<?code a = [None, 1, "test", None]?> | <?for item in a?><?if isnone(item)?>None<?else?><?print item?><?end if?><?end for?> | isnone |
<?code x = True?><?code y = False?><?code z = 1?> | <?if isbool(x)?>x is a boolean<?end if?><?if isbool(y)?>y is a boolean<?end if?><?if isbool(z)?>z is a boolean<?else?>z is not a boolean<?end if?> | isbool |
<?code x = True?><?code y = 42?> | <?print isbool(x)?><?print isbool(y)?> | isbool |
<?code a = False?><?code b = 42?> | <?print isbool(a)?><?print isbool(b)?> | isbool |
<?code x = {'a': 1, 'b': True}?><?code y = x['b']?> | <?if isbool(y)?>y is boolean<?else?>y is not boolean<?end if?> | isbool |
<?code x = False?><?code y = None?><?code z = 0?> | <?print isbool(x)?><?print isbool(y)?><?print isbool(z)?> | isbool |
<?code a = True?><?code b = False?><?code c = "True"?> | <?print isbool(a and b)?><?print isbool(a or b)?><?print isbool(c)?> | isbool |
<?code x = True?><?code y = 1?><?code z = 'test'?> | <?print isbool(x)?><?print isbool(y)?><?print isbool(z)?> | isbool |
<?code x = {1: True, 2: False}?><?code y = x.values()?><?code z = list(y)?> | <?print isbool(z[0])?><?print isbool(z[1])?> | isbool |
<?code x = False?><?code y = 0?> | <?print isbool(x)?><?print isbool(not y)?> | isbool |
<?code x = [True, 'a', 1, False, None]?> | <?print isbool(x[0])?><?print isbool(x[1])?><?print isbool(x[2])?><?print isbool(x[3])?><?print isbool(x[-1])?> | isbool |
<?code x = 42?><?code y = 42.0?><?code z = '42'?> | <?print isint(x)?><?print isint(y)?><?print isint(z)?> | isint |
<?code x = 1234?><?code y = 1234.0?><?code z = '1234'?><?code a = @(2024-04-04)?><?code b = #fff?> | <?print isint(x)?><?print isint(y)?><?print isint(z)?><?print isint(a)?><?print isint(b)?> | isint |
<?code x = {1: True, 2: 'hello', 3: 3.14, 4: 4} ?> | <?print isint(x[1])?><?print isint(x[2])?><?print isint(x[3])?><?print isint(x[4])?> | isint |
<?code x = [1, 2.0, "3", True, None]?> | <?print isint(x[0])?><?print isint(x[1])?><?print isint(x[2])?><?print isint(x[3])?><?print isint(x[4])?> | isint |
<?code x = False?><?code y = 0?><?code z = 0.0?><?code a = ""?><?code b = []?><?code c = {}?><?code d = {/}?> | <?print isint(x)?><?print isint(y)?><?print isint(z)?><?print isint(a)?><?print isint(b)?><?print isint(c)?><?print isint(d)?> | isint |
<?code x = now().year?><?code y = now()?> | <?print isint(x)?><?print isint(y)?> | isint |
<?code x = 42?><?code y = 42.0?> | <?print isint(x)?><?print isint(y)?> | isint |
<?code x = {1: 'one', 2: 'two'}?><?code y = [1, 2, 3]?><?code z = '123'?> | <?print isint(x)?><?print isint(y)?><?print isint(z)?> | isint |
<?code x = False?><?code y = 0?><?code z = 0.0?> | <?print isint(x)?><?print isint(y)?><?print isint(z)?> | isint |
<?code x = 1234?><?code y = '1234'?><?code z = 1234.0?> | <?print isint(x)?><?print isint(y)?><?print isint(z)?> | isint |
<?code x = 1.0?><?code y = 1?><?code z = '1.0'?> | <?print isfloat(x)?><?print isfloat(y)?><?print isfloat(z)?> | isfloat |
<?code x = 1.23?><?code y = 4.56?> | <?print isfloat(x and y)?> | isfloat |
<?code x = 12.34?><?code y = 56.78?><?code z = x + y?> | <?print isfloat(z)?> | isfloat |
<?code x = [1.0, 2, "3.0"]?> | <?print isfloat(x[0])?><?print isfloat(x[1])?><?print isfloat(x[2])?> | isfloat |
<?code x = { "a": 123, "b": 45.67 }?> | <?print isfloat(x.a)?><?print isfloat(x.b)?> | isfloat |
<?code x = { "a": 1.23, "b": 45, "c": "67.89", "d": True, "e": now() } ?> | <?print isfloat(x.a)?><?print isfloat(x.b)?><?print isfloat(x.c)?><?print isfloat(x.d)?><?print isfloat(x.e)?> | isfloat |
<?code x = [1.23, 4.56, 7.89]?> | <?print all(isfloat(i) for i in x)?> | isfloat |
<?code x = 12.34 ?> | <?print isfloat(x)?> | isfloat |
<?code x = { "a": 123, "b": 4.56, "c": "78.9", "d": True } ?> | <?print isfloat(x["a"])?><?print isfloat(x.b)?><?print isfloat(x["c"])?><?print isfloat(x.d)?> | isfloat |
<?code x = [1, 2, 3.14, "4.56", True, None]?> | <?print list(isfloat(item) for item in x)?> | isfloat |
<?code x = "hello"?> | <?print isstr(x)?> | isstr |
<?code x = { "a": "hello", "b": 123, "c": 4.56, "d": True, "e": "world" } ?> | <?print isstr(x.a)?><?print isstr(x["b"])?><?print isstr(x["c"])?><?print isstr(x.d)?><?print isstr(x.e)?> | isstr |
<?code x = now().isoformat()?> | <?print isstr(x)?> | isstr |
<?code x = chr(97)?> | <?print isstr(x)?> | isstr |
<?code x = ["apple", 123, "banana", True]?> | <?print isstr(x[0])?><?print isstr(x[1])?><?print isstr(x[2])?><?print isstr(x[3])?> | isstr |
<?code x = { "name": "Alice", "age": 30, "city": "New York" }?> | <?print isstr(x.name)?><?print isstr(x.age)?><?print isstr(x.city)?> | isstr |
<?code a = '123'?><?code b = 123?><?code c = 'abc'?> | <?print isstr(a) and not isstr(b) and isstr(c)?> | isstr |
<?code a = 'hello'?><?code b = 42?><?code c = {/}?><?code d = 'world'?> | <?print isstr(a) and not isstr(b) and not isstr(c) and isstr(d)?> | isstr |
<?code a = @(2024-04-04)?><?code b = '2024-04-04'?> | <?print isdate(a) and not isdate(b)?> | isdate |
<?code a = @(2024-01-01)?><?code b = @(2024-01-01T12:00:00)?><?code c = '2024-01-01'?> | <?print isdate(a) and not isdate(b) and not isdate(c)?> | isdate |
<?code a = @(2024-01-01)?><?code b = now()?><?code c = today()?><?code d = 'today'?> | <?print isdate(a) and not isdate(b) and isdate(c) and not isdate(d)?> | isdate |
<?code a = @(2024-01-01)?><?code b = []?><?code c = {}?><?code d = {/}?> | <?print isdate(a) and not isdate(b) and not isdate(c) and not isdate(d)?> | isdate |
<?code a = @(2024-01-01)?><?code b = @(2024-01-01) + timedelta(1)?><?code c = @(2024-01-01) + monthdelta(1)?> | <?print isdate(a) and isdate(b) and isdate(c)?> | isdate |
<?code a = @(2024-01-01)?><?code b = now()?> | <?print isdate(a) and not isdate(b)?> | isdate |
<?code a = today()?><?code b = now()?><?code c = utcnow()?> | <?print isdate(a) and not isdate(b) and not isdate(c)?> | isdate |
<?code a = @(2024-04-01)?><?code b = "@(2024-04-01)"?> | <?print isdate(a) and not isdate(b)?> | isdate |
<?code a = @(2024-01-01)?><?code b = @(2024-01-01T12:00:00)?><?code c = "@(2024-01-01)"?> | <?print isdate(a) and not isdate(b) and not isdate(c)?> | isdate |
<?code a = timedelta(1)?><?code b = monthdelta(1)?> | <?print istimedelta(a) and not istimedelta(b)?> | istimedelta |
<?code a = timedelta(days=1, seconds=7200)?><?code b = @(2024-04-03)?><?code c = monthdelta(1)?> | <?print istimedelta(a) and not istimedelta(b) and not istimedelta(c)?> | istimedelta |
<?code a = timedelta(days=365)?><?code b = @(2024-01-01)?><?code c = monthdelta(12)?> | <?print istimedelta(a) and not istimedelta(b) and not istimedelta(c)?> | istimedelta |
<?code a = timedelta(0)?><?code b = 0?> | <?print istimedelta(a) and not istimedelta(b)?> | istimedelta |
<?code a = timedelta(days=1)?><?code b = timedelta(seconds=1)?><?code c = timedelta(microseconds=1)?> | <?print istimedelta(a) and istimedelta(b) and istimedelta(c)?> | istimedelta |
<?code a = timedelta(days=1, seconds=7200)?><?code b = a + timedelta(days=2)?><?code c = b + @(2023-04-01)?> | <?print istimedelta(a) and istimedelta(b) and not istimedelta(c)?> | istimedelta |
<?code a = timedelta(days=1, seconds=1, microseconds=1)?><?code b = timedelta(0)?><?code c = None?> | <?print istimedelta(a) and istimedelta(b) and not istimedelta(c)?> | istimedelta |
<?code a = timedelta(1)?><?code b = monthdelta(1)?> | <?print istimedelta(a) and not istimedelta(b)?> | istimedelta |
<?code a = timedelta(days=100)?><?code b = @(2024-04-01)?><?code c = 42?><?code d = "string"?> | <?print istimedelta(a) and not istimedelta(b) and not istimedelta(c) and not istimedelta(d)?> | istimedelta |
<?code a = timedelta(days=0, seconds=0, microseconds=0)?><?code b = timedelta(1)?><?code c = timedelta(-1)?> | <?print istimedelta(a) and istimedelta(b) and istimedelta(c)?> | istimedelta |
<?code a = monthdelta(1)?><?code b = monthdelta(0)?> | <?print ismonthdelta(a) and ismonthdelta(b)?> | ismonthdelta |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.