Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
Can anyone tell me what is string in Python?

1 Answer

0 votes
by (108k points)

A string is a data type that holds text data. Means, if you want to add text in your variable, then you can define that variable as a string and store any text inside the variable. For example, if you want to store the text data ‘Hi! Welcome to Intellipaat…’ in a variable named ‘text,’ then you can follow the below method:

text=”Hi! Welcome to Intellipaat…”

print(text)

The output:

Hi! Welcome to Intellipaat…

If you are looking for an online course to learn Python, I recommend this Python Certification program by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers
asked Sep 16, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer

Browse Categories

...