QuestionQ70

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

Which of the following operators may be used with strings?

  1. in
Explanation

With Python strings, + performs concatenation, * performs repetition when used with an integer, and in performs substring-membership testing. Subtraction (-) is not supported for strings.

Community Discussion

No comments yet. Be the first to start the discussion!