What will be the output of the following Python code snippet?
print(‘abcefd’.replace(‘cd’, ’12’))
a) ab1ef2
b) abcefd
c) ab1efd
d) ab12ed2
Answer: b
Explanation: The first substring is not present in the given string and hence nothing is replaced.
Related Posts
A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.
The ______ is the one in which the primary key of one relation is used as a normal attribute in another relation.
The subset of a super key is a candidate key under what condition?
The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as a primary key is called ______________
Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?
A _________ integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation.
Which one of the following cannot be taken as a primary key?
Join The Discussion