- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Rohan Singh has Published 171 Articles
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
375 Views
In Python, we can use various methods like using square brackets, slicing, and using indices to get characters from the string with the help of their index. A string is a sequence of characters with each character being assigned a unique index. The index specifies the position of the character ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
273 Views
In Python we can get a character from the given string using the indexing operator ‘[ ]’, using slices, and using indices separated by a colon. By passing the index of the character we want to access to the index operator we can easily get the character from the string. ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
1K+ Views
In Python, a subset of a string is a sequence of characters that is part of the original string. We can find all the subsets of a string using itertools module in Python. In this article, we will see how we can generate all the subsets of a string by ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
3K+ Views
In Python, a string can be divided into N equal parts using the slicing method. Substrings of equal length can be extracted using the Python slicing method by specifying the starting and ending index of the substring. In his article, we will see how we can divide a string into ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
207 Views
In Python, we can use the pathlib module, os module, and glob module to display all the folders in a directory. The os module contains various functions like os.scandir, os.walk , os.listdir or glob(), and iglob() methods, etc to list all the directories in a directory. A directory is a folder ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
101 Views
In Python, the comparison operator (==) and equals() methods are used in different ways when working with strings. To differentiate between the == operator and the equals method in Python we have to use them with string comparison. String comparison widely occurs when we work with strings in data analysis ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
126 Views
In Python, we can demonstrate string interpolation using the f-string, %operator, and format() method. String Interpolation is the process of inserting dynamic data or variables in the string. It is useful when a string is formed using variables or expressions without using any string formatting or string concatenation. In this ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
475 Views
In Python, we can create a string object using Python's inbuilt function str() and also by assigning a sequence of characters to a variable. The sequence of characters is enclosed in the single quote or double quotes. We can also create a multiline string object using triple quotes. In this ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
7K+ Views
In python we can use the comparison operators like “==”, ”!=”, “”, ”=” and python inbuilt function like lower() and upper() methods to compare two strings by ignoring case. Strings are character sequences enclosed in double quotes. These operators compare strings based on the Unicode code points assigned to ... Read More
![Rohan Singh](https://www.tutorialspoint.com/assets/profiles/638564/profile/60_146647-1681360804.jpg)
Rohan Singh
3K+ Views
In Python, we can clear the string buffer by assigning an empty string to the buffer and using Python's inbuilt reset() method. A string buffer is a mutable sequence of characters. These characters can be modified according to the requirements. The string buffer can be modified or cleared before the ... Read More