What will be the output of the following Python code?
x = “abcdef”
i = “a”
while i in x:
x = x[1:]
print(i, end = ” “)
a) a a a a a a
b) a
c) no output
d) error
Answer: b
Explanation: The string x is being shortened by one character in each iteration.
Related Posts
A _________________ index is the one which satisfies all the columns requested in the query without performing further lookup into the clustered index.
In _______________ index instead of storing all the columns for a record together, each column is stored separately with all other rows in an index.
If an index is _________________ the metadata and statistics continue to exists
What are composite indexes?
Does index take space in the disk?:
What is true about indexes?
Which one is true about clustered index?
Join The Discussion