Data Science and Machine Learning Internship ...
- 22k Enrolled Learners
- Weekend/Weekday
- Live Class
In Python, Strings can be created by simply enclosing characters in quotes. Python does not support character types. These are treated as length-one strings, and are also considered as substrings. Substrings are immutable and can’t be changed once created.
Strings are the ordered blocks of text that are enclosed in single or double quotations. Thus, whatever is written in quotes, is considered as string. Though it can be written in single or double quotations, double quotation marks allow the user to extend strings over multiple lines without backslashes, which is usually the signal of continuation of an expression, e.g., ‘abc’, “ABC”.
>>> ‘abc’+‘def’
‘abcdef’
>>> ‘abc’*3
‘abcabcabc’
Following are the built-in String Methods that can be used in Python:
Got a question for us? Mention them in the comments section and we will get back to you.
Related Posts:
Course Name | Date | Details |
---|---|---|
Data Science with Python Certification Course | Class Starts on 1st February,2025 1st February SAT&SUN (Weekend Batch) | View Details |
Data Science with Python Certification Course | Class Starts on 29th March,2025 29th March SAT&SUN (Weekend Batch) | View Details |
edureka.co