What will be the output of the following Python code snippet?
print(‘abef’.replace(‘cd’, ’12’))
a) abef
b) 12
c) error
d) none of the mentioned
Answer: a
Explanation: The first substring is not present in the given string and hence nothing is replaced.
Related Posts
An attribute in a relation is a foreign key if the _______ key from one relation is used as an attribute in that relation.
Department (dept name, building, budget) and Employee (employee_id, name, dept name, salary) Here the dept_name attribute appears in both the relations. Here using common attributes in relation schema is one way of relating ___________ relations.
Consider attributes ID, CITY and NAME. Which one of this can be considered as a super key?
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 ______________
Join The Discussion