String in Python Quiz 6

Share with others

Welcome to your String in Python Quiz 6

Q51. Python allows _______ operations on string data type.

Q52. Write the output of the following.

>>> str1 = 'Hello World!'
>>> 'W' in str1

Q53. ______ method is used to access some part of a string or substring.

Q54. str1[n:m] returns all the characters starting from str1[n] till str1[m-1].(T/F)

Q55. str[5 : 11] will return _______ characters.

Q56. str[11:5] will return _________

Q57. str[ : ] will return ___________

Q58. Slice operation can also take a third parameter that specifies the ____________

Q59. Which of the following is correct slicing operation to extract every kth character from the string str1 starting from n and ending at m-1.

Q60. Which of the following will return reverse string str1?


Share with others

Leave a Reply

error: Content is protected !!