- What is the output of
print("Python".isalnum())?
a) True
b) False
c) Error
d) None
Correct Answer: a) True - Which of the following is used to create a list in Python?
a) {}
b) []
c) ()
d) <>
Correct Answer: b) [] - What is the output of
print("Python".istitle())?
a) True
b) False
c) Error
d) None
Correct Answer: b) False - Which of the following is used to sort a list in ascending order?
a) sort()
b) sorted()
c) reverse()
d) reversed()
Correct Answer: a) sort() - What is the output of
print("Python".isnumeric())?
a) True
b) False
c) Error
d) None
Correct Answer: b) False - Which of the following is used to create a dictionary in Python?
a) {}
b) []
c) ()
d) <>
Correct Answer: a) {} - What is the output of
print("Python".isdecimal())?
a) True
b) False
c) Error
d) None
Correct Answer: b) False - Which of the following is used to create a function in Python?
a) def
b) function
c) func
d) define
Correct Answer: a) def - What is the output of
print("Python".isidentifier())?
a) True
b) False
c) Error
d) None
Correct Answer: a) True - Which of the following is used to create a class in Python?
a) class
b) def
c) struct
d) object
Correct Answer: a) class - What is the output of
print("Python".isprintable())?
a) True
b) False
c) Error
d) None
Correct Answer: a) True - Which of the following is used to create a lambda function in Python?
a) lambda
b) def
c) function
d) func
Correct Answer: a) lambda - What is the output of
print("Python".isascii())?
a) True
b) False
c) Error
d) None
Correct Answer: a) True - Which of the following is used to create a generator in Python?
a) yield
b) return
c) break
d) continue
Correct Answer: a) yield - What is the output ofÂ
print("Python".isalpha())?
a) True
b) False
c) Error
d) None
Correct Answer:Â a) True