Important Notice:

Course Content
Strings in Python (Chapter-6) M3-R5
About Lesson
Sequence Data Types:-

          Sequence एक item का collection जो positive integer द्वारा indexing होती है। यह mutable और immutable variable का combination है। पायथन में तीन प्रकार के sequence उपलब्ध है

  1. String
  2. List
  3. Tuples
String:-

          Character के sequence को string कहा जाता है string को single Quotes (‘  ’) या double quotes (“  ”) में represent किया जाता है।

Note:- 1. string data को single line में represent करने के लिए ‘ ’ or “ ” का use कर सकते हैं।

2. String data को multi line में represent करने के लिए “”” “”” का use किया जाता है।

Defining String Data:-

st= “ak it solution”

print(st)

 print(type(st))

num= “10”

print(num)

print(type(num))

num1= “20.5”

print(num1)

 print(type(num1))

 

Sequence Data Types:-

          Sequence is a collection of items indexed by a positive integer. It is a combination of mutable and immutable variables. There are three types of sequences available in Python

  1. String
  2. List
  3. Tuples
String:-

                    A sequence of characters is called a string. The string is represented in single quotes (‘ ‘) or double quotes (“ ”).

Note:- 1. To represent string data in a single line, you can use ‘ ’ or “ ”.

2. “”” “”” is used to represent string data in multi lines.

Defining String Data:-

st= “ak it solution”

print(st)

print(type(st))

num= “10”

print(num)

print(type(num))

num1= “20.5”

print(num1)

print(type(num1))

error: Content is protected !!