Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer
Q. To concatenate two strings to a third what statements are applicable?
a. s3 = s1 . s2
b. s3 = s1.add(s2)
c. s3 = s1. add (s2)
d. s3 = s1 * s2
Q. Which of the following statement prints hello\example\test.txt?
a. print(“hello\\example\\test.txt”)
b. print(“hello\\example\\test.txt”)
c. print(“hello\\”example\\”test.txt”)
d. print(“hello”\\example”\\test.txt”)
Q. Suppose s is “\t\tWorld\n”, what is s.strip()?
a. \\t\\tworld\\n
b. \\t\\tworld\\n
c. \\t\\tworld\\n
d. world