Code examples for the String tag - developer knowledge base (31)

"Learn how to convert an array to a string in Swift, with an example of a simple array of strings to illustrate the process."
Discover how to capitalize each word in Python using a simple example. Learn the basics of string manipulation for a variety of programming tasks.
"Convert a string into a column in Python with an example: Splitting a string into a list of words and printing each word on a separate line."
How to reverse a string in Python: learn how to reverse a string using slicing and a for loop, with an example.
Learn how to turn a string into an array in Python with an example. From splitting strings to creating lists & tuples, explore the different ways to make arrays from strings.
"Split strings in Python using multiple separators with an example: s.split(';|,') --> ['a','b','c','d']. Learn more!"
Learn how to capitalize the first letter of a string in Python with an example.
Learn how to convert any string to lowercase in Python with an easy-to-follow example.
Python: How to convert column to row using an example. Learn to manipulate data with a few simple lines of code.
"Learn how to turn a set into a string in Python with an easy example: setA = {'1', '2', '3'}; strA = ''.join(setA) # strA = '123'".
Learn how to capitalize letters in Python using the .upper() method with a simple example.
"Learn how to reverse a string in Python with a simple example. Understand how to write code to reverse a string in Python and use it in your code!"
Learn how to capitalize letters in Python with a simple example: convert a string to uppercase using str.upper().
Convert list to string in Python with this example: "string = ''.join(list)".
"Learn how to convert a list to a string in Python using join() with an example!"
"Turn your list into a string using list comprehension, join(), and map() - see an example using Python!"
Transform ints to strs in Python with an example: learn how to use the str() method for casting ints as strings for text manipulation.
Transform strings into dictionaries in Python with an easy-to-follow example: create a dict from a string, access items & modify values.
Learn how to use slicing to extract a substring from a string in Python with an example.
Convert strings to numbers in Python with an example: int("3") to get 3, float("3.14") to get 3.14.
1 2 Next