Which function is used to return JSON in Flask?
Which of the following data structures is returned by the functions globals() and locals()?
s1={1,2,3,4,5}
s2={1,2,6,8,9}
print((s1|s2)-(s1&s2))
Which of the following is same as the above code
What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?
tday=datetime.date.today()
print(tday.weekday())
What will be the output of the following Python code?
>>> a={5,6,7,8}
>>> b={7,8,9,10}
>>> len(a+b)
import time
t=(2010, 9, 20, 8, 45, 12, 6, 0, 0)
time.asctime(t)
What will be the output of the following code?
x = "abekus".upper()
y = "ABEKUS".upper()
if (x == "ABEKUS" or y == "ABEKUS"):
print("WELCOME")
else:
print("HELLO")
capitalize() method is used to
What is the output of print(k) in the following Python code snippet?
k = [print(i) for i in my_string if i not in "aeiou"]
print(k)
What is the output of the following Python code?
class Book:
def __init__(self,pages,color):
self.pages=pages
self.color=color
def total(self):
return self.pages
class chapter:
def __init__(self,name,pages,color):
self.name=name
self.obj_book=Book(pages,color)
def totalpages(self):
return self.obj_book.total()
ch1=chapter('helper',20,'blue')
print(ch1.totalpages())