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 21st September,2024 21st September SAT&SUN (Weekend Batch) | View Details |
Data Science with Python Certification Course | Class Starts on 19th October,2024 19th October SAT&SUN (Weekend Batch) | View Details |
edureka.co