Intro

Strings

Intro

🙋 Need help? Ask an expert now!

Strings!

In python a string is grouping of text, and in python the string (str) class is very powerful and can allow you to do a multitude of operations.

To start, lets see how we can define a string in Python

  1. Enclosed in either single or double quotes
            
string_1 = 'hello' string_2 = "world"
  1. Converting a number to string using str() method
            
x = 5 string_3 = str(x)

string_3 is now '5'

Edit Me on GitHub!