Tarun Chandra has Published 61 Articles

How to check whether a string starts with XYZ in Python?

Tarun Chandra

Tarun Chandra

Updated on 26-Oct-2022 07:59:07

316 Views

A string is a collection of characters stored as a single value. Un like other technologies there is no need to explicitly declare strings in python (for that matter any variable), you just need to assign strings to a literal this makes Python strings easy to use. In Python, a ... Read More

How to wrap long lines in Python?

Tarun Chandra

Tarun Chandra

Updated on 26-Oct-2022 07:52:45

18K+ Views

A string is a collection of characters that can represent a single word or a whole sentence. Unlike Java there is no need to declare Python strings explicitly we can directly assign string value to a literal. A string in Python is represented by a string class which provides several ... Read More

What does the 'b' character do in front of a string literal in Python?

Tarun Chandra

Tarun Chandra

Updated on 25-Oct-2022 14:32:05

9K+ Views

A string is a collection of characters that can represent a single word or a complete phrase. Since you can directly assign strings in Python to a literal (unlike other technologies) it is easy to use them. Python includes a number of built in functions and methods to perform various ... Read More

How to replace all occurrences of a string with another string in Python?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 12:53:47

2K+ Views

A string is a group of characters that may be used to represent a single word or an entire phrase. In Python strings not require explicit declaration and may be defined with or without a specifier therefore, it is easy to use them. Python has various built in functions and ... Read More

How to find index of last occurrence of a substring in a string in Python?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 12:48:08

11K+ Views

A string is a collection of characters that can represent a single word or a whole sentence. We can declare a string or any other datatype in python without the datatype specifier. Therefore, it is easy to use strings in Python compared to Java. A string is an object of ... Read More

How to check if a string contains only decimal characters?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 12:25:45

4K+ Views

A string is a group of characters that may be used to represent a single word or an entire sentence. Strings are simple to use in Python since they do not require explicit declaration and may be defined with or without a specifier. In Python strings are represented by the ... Read More

How to get a string left padded with zeros in Python?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 12:10:52

16K+ Views

A string is a group of characters that can represent a single word or a whole sentence. In Python there is no need to declare strings explicitly we can directly assign them to a literal. Therefore, easy to use them. A string is an object of the String class, which ... Read More

How to invert case for all letters in a string in Python?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 12:02:47

2K+ Views

A string is a group of characters that can represent a single word or a complete sentence. In Python there is no need to declare variables explicitly using the datatype specifier you can directly assign them to a literal. Therefore, compared to other technologies like Java it is easy to ... Read More

How to check if a string contains only whitespace letters in Python?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 11:59:00

9K+ Views

A string is a group of characters that can represent a single word or a complete sentence. In Python there is no need to declare variables explicitly using the datatype specifier you can directly assign them to a literal. Therefore, compared to other technologies like Java it is easy to ... Read More

How to split string by a delimiter string in Python?

Tarun Chandra

Tarun Chandra

Updated on 19-Oct-2022 09:05:16

1K+ Views

A string is a collection of characters that can represent a single word or a complete phrase. Unlike Java there is no need to declare Python strings explicitly we can directly assign string value to a literal. A string is an object of the String class, which contains multiple built ... Read More

Advertisements