What are Strings in Python ? | Most asked Interview Questions for fresher

preview_player
Показать описание
What are Strings in Python ? | Most asked Interview Questions for fresher's 2023 | Q&A

1.
A string in Python is a
sequence of characters enclosed
within either single quotes (' ')
or double quotes (" ").
2.
It is a data type used to
represent text and is one
of the fundamental
data types in Python.
Strings can contain letters,
numbers, symbols & whitespace
characters.

3.
Strings in Python are
immutable -
Meaning they cannot be
modified once created.
4.
However,
Various Operations can be
performed on strings,
such as
• concatenation
• slicing
• accessing

5.
Strings also support various Built-in Methods that allow
• Manipulation,
• Formatting,
• Transformation

Some common string methods include

• lower() • upper()
• replace() • split()
• join()

#pythoninterviewquestions #python #pythoninterview #interviewtips
Рекомендации по теме
welcome to shbcf.ru