adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
re.split(r'(a)(t)', 'Maths is a difficult subject')

a.

[‘M a t h s i s a d i f f i c u l t s u b j e c t’]

b.

[‘Maths’, ‘is’, ‘a’, ‘difficult’, ‘subject’]

c.

‘Maths is a difficult subject’

d.

[‘M’, ‘a’, ‘t’, ‘hs is a difficult subject’]

Answer: (d).[‘M’, ‘a’, ‘t’, ‘hs is a difficult subject’]

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown below?

Similar Questions

Discover Related MCQs

Q. Which of the following functions returns a dictionary mapping group names to group numbers?

Q. Which of the following statements regarding the output of the function re.match is incorrect?

Q. To open a file c:\scores.txt for reading, we use

Q. To open a file c:\scores.txt for writing, we use

Q. To open a file c:\scores.txt for appending data, we use

Q. To read two characters from a file object infile, we use

Q. To read the entire remaining contents of the file as a string from a file object infile, we use

Q. To read the next line of the file from a file object infile, we use

Q. To read the remaining lines of the file from a file object infile, we use

Q. The readlines() method returns

Q. Which are the two built-in functions to read a line of text from standard input, which by default comes from the keyboard?

Q. Which one of the following is not attributes of file

Q. What is the use of tell() method in python?

Q. What is the current syntax of rename() a file?

Q. What is the current syntax of remove() a file?

Q. What is the use of seek() method in files?

Q. What is the use of truncate() method in file?

Q. Which is/are the basic I/O connections in file?

Q. Which of the following mode will refer to binary data?

Q. What is the pickling?