Data Science and Machine Learning Internship ...
- 1k 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 | |
---|---|---|
Data Science with Python Certification Course | Class Starts on 13th February,2023 13th February MON-FRI (Weekday Batch) | View Details |
Data Science with Python Certification Course | Class Starts on 25th February,2023 25th February SAT&SUN (Weekend Batch) | View Details |
edureka.co