Hướng dẫn python is numeric type - python là loại số

Các loại dữ liệu là phân loại hoặc phân loại các mục dữ liệu. Nó đại diện cho loại giá trị cho biết những hoạt động có thể được thực hiện trên một dữ liệu cụ thể. Vì mọi thứ là một đối tượng trong lập trình Python, các loại dữ liệu thực sự là các lớp và biến là ví dụ (đối tượng) của các lớp này.

Nội dung chính

  • Loại trình tự
  • Số nguyên - Giá trị này được biểu thị bằng lớp Int. Nó chứa các số toàn bộ dương hoặc âm (không có phân số hoặc thập phân). Trong Python, không có giới hạn về giá trị số nguyên có thể là bao lâu.
  • Từ điển
  • Kiểu dữ liệu số trong Python với ví dụ là gì?
  • Loại dữ liệu số nào?
  • 4 loại số khác nhau trong Python là gì?
  • Hai loại dữ liệu số trong Python là gì?

Sau đây là loại dữ liệu tiêu chuẩn hoặc tích hợp của Python:

  • Số
  • Loại trình tự
  • Số nguyên - Giá trị này được biểu thị bằng lớp Int. Nó chứa các số toàn bộ dương hoặc âm (không có phân số hoặc thập phân). Trong Python, không có giới hạn về giá trị số nguyên có thể là bao lâu.
  • Từ điển
  • Từ điển

Hướng dẫn python is numeric type - python là loại số

Số

Loại trình tự

  • Số nguyên - Giá trị này được biểu thị bằng lớp Int. Nó chứa các số toàn bộ dương hoặc âm (không có phân số hoặc thập phân). Trong Python, không có giới hạn về giá trị số nguyên có thể là bao lâu.– This value is represented by int class. It contains positive or negative whole numbers (without fraction or decimal). In Python there is no limit to how long an integer value can be.
  • Từ điển– This value is represented by float class. It is a real number with floating point representation. It is specified by a decimal point. Optionally, the character e or E followed by a positive or negative integer may be appended to specify scientific notation.
  • Kiểu dữ liệu số trong Python với ví dụ là gì? – Complex number is represented by complex class. It is specified as (real part) + (imaginary part)j. For example – 2+3j

Loại dữ liệu số nào?

4 loại số khác nhau trong Python là gì?3,
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
4and
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
5Class trong Python.

Hai loại dữ liệu số trong Python là gì?

Python3

Số nguyên - Giá trị này được biểu thị bằng lớp Int. Nó chứa các số toàn bộ dương hoặc âm (không có phân số hoặc thập phân). Trong Python, không có giới hạn về giá trị số nguyên có thể là bao lâu.

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
2
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
5

Từ điển

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
21
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
24

Kiểu dữ liệu số trong Python với ví dụ là gì?

Loại dữ liệu số nào?

4 loại số khác nhau trong Python là gì?

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
7

Loại trình tự

Số nguyên - Giá trị này được biểu thị bằng lớp Int. Nó chứa các số toàn bộ dương hoặc âm (không có phân số hoặc thập phân). Trong Python, không có giới hạn về giá trị số nguyên có thể là bao lâu.

  • Từ điển
  • Từ điển
  • Kiểu dữ liệu số trong Python với ví dụ là gì?

Số nguyên - Giá trị này được biểu thị bằng lớp Int. Nó chứa các số toàn bộ dương hoặc âm (không có phân số hoặc thập phân). Trong Python, không có giới hạn về giá trị số nguyên có thể là bao lâu.

Loại dữ liệu số nào?
 

Kiểu dữ liệu số trong Python với ví dụ là gì?

Loại dữ liệu số nào?

4 loại số khác nhau trong Python là gì?

Python3

Hai loại dữ liệu số trong Python là gì?

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
42
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
45

Sau đây là loại dữ liệu tiêu chuẩn hoặc tích hợp của Python:

Python3

Số

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
44
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
75
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
00
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
03
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
04
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
08
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
03
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
12
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05

Output:

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s

Boolean– To know more about strings, refer Python String.

Bộ

Boolean– This value is represented by int class. It contains positive or negative whole numbers (without fraction or decimal). In Python there is no limit to how long an integer value can be.
 

Bộ– This value is represented by float class. It is a real number with floating point representation. It is specified by a decimal point. Optionally, the character e or E followed by a positive or negative integer may be appended to specify scientific notation.

Tạo chuỗi

Python3

Chuỗi trong Python có thể được tạo bằng cách sử dụng trích dẫn đơn hoặc trích dẫn đôi hoặc thậm chí trích dẫn ba.

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
21
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
47
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
49
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
34
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
47
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
78
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
203
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
04
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
58
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
27
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05

Truy cập các thành phần của chuỗi

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
76
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
2

Trong Python, các ký tự riêng lẻ của chuỗi có thể được truy cập bằng cách sử dụng phương pháp lập chỉ mục. Lập chỉ mục cho phép tham chiếu địa chỉ âm đến các ký tự truy cập từ phía sau chuỗi, ví dụ: -1 đề cập đến nhân vật cuối cùng, -2 đề cập đến nhân vật cuối cùng thứ hai, v.v.

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
47
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
41

Python3

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
43
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
45
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
43__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
96
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73

_______

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
27
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
12
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
12
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
16
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
12
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
26
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05

Output:

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4

Lưu ý - Để biết thêm về danh sách, hãy tham khảo danh sách Python.– To know more about Lists, refer Python List.– To know more about Lists, refer Python List.

3) Tuple

Giống như danh sách, Tuple cũng là một bộ sưu tập các đối tượng Python được đặt hàng. Sự khác biệt duy nhất giữa tuple và danh sách là các bộ dữ liệu là bất biến, tức là các bộ dữ liệu không thể được sửa đổi sau khi nó được tạo ra. Nó được đại diện bởi ________ 228 Class. & Nbsp; 
 

Tạo tuple

Trong Python, các bộ dữ liệu được tạo ra bằng cách đặt một chuỗi các giá trị được phân tách bằng ‘dấu phẩy có hoặc không sử dụng dấu ngoặc đơn để nhóm chuỗi dữ liệu. Tuples có thể chứa bất kỳ số lượng phần tử và của bất kỳ kiểu dữ liệu nào (như chuỗi, số nguyên, danh sách, v.v.).

Lưu ý: Bộ dữ liệu cũng có thể được tạo với một phần tử duy nhất, nhưng nó hơi khó khăn. Có một yếu tố trong dấu ngoặc đơn là không đủ, phải có một dấu vết dấu vết để biến nó thành một tuple. Tuples can also be created with a single element, but it is a bit tricky. Having one element in the parentheses is not sufficient, there must be a trailing ‘comma’ to make it a tuple. Tuples can also be created with a single element, but it is a bit tricky. Having one element in the parentheses is not sufficient, there must be a trailing ‘comma’ to make it a tuple.

Python3

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
31
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
34
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
37
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
70
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
47
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
37
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
51
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
27
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
66
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
70
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
71
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
70
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
80
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
37

Các

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
95
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
98
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
200
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
202
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
204
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
207
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
210

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
7

Lưu ý - Tạo ra tuple python mà không sử dụng dấu ngoặc đơn được gọi là đóng gói tple.– Creation of Python tuple without the use of parentheses is known as Tuple Packing.– Creation of Python tuple without the use of parentheses is known as Tuple Packing.

Truy cập các yếu tố của tuple

Để truy cập các mục Tuple, hãy tham khảo số chỉ mục. Sử dụng toán tử chỉ mục

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
82 để truy cập vào một mục trong một tuple. Chỉ số phải là một số nguyên. Các bộ dữ liệu lồng nhau được truy cập bằng cách sử dụng lập chỉ mục lồng nhau.

Python3

Is

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
228
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
229
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
231
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
04
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
225
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
236
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
229
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
231
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
12
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
225
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
245
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
229
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
231
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
12
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
26
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
225

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
6

Lưu ý - Để biết thêm về các bộ dữ liệu, hãy tham khảo các bộ dữ liệu python.– To know more about tuples, refer Python Tuples.– To know more about tuples, refer Python Tuples.

Boolean

Kiểu dữ liệu với một trong hai giá trị tích hợp,

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
252or
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
253. Các đối tượng Boolean bằng với sự thật là sự thật (đúng) và những đối tượng bằng sai là giả (sai). Nhưng các đối tượng không phải là Boolean cũng có thể được đánh giá trong bối cảnh Boolean và được xác định là đúng hoặc sai. Nó được ký hiệu là lớp
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
254.

Lưu ý - Đúng và Sai với vốn ’T, và F, là Booleans hợp lệ nếu không Python sẽ gây ra lỗi.– True and False with capital ‘T’ and ‘F’ are valid booleans otherwise python will throw an error.– True and False with capital ‘T’ and ‘F’ are valid booleans otherwise python will throw an error.

Python3

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
259
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
260
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
253
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
260
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
270

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
20
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1

Bộ

Trong Python, Set là một tập hợp các loại dữ liệu không có thứ tự là có thể sử dụng được, có thể thay đổi và không có các yếu tố trùng lặp. Thứ tự của các phần tử trong một bộ không được xác định mặc dù nó có thể bao gồm các yếu tố khác nhau.

Tạo bộ

Các bộ có thể được tạo bằng cách sử dụng hàm

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
271 tích hợp với một đối tượng có thể lặp lại hoặc một chuỗi bằng cách đặt chuỗi bên trong niềng răng xoăn, được phân tách bằng ‘dấu phẩy. Loại phần tử trong một tập hợp không cần phải giống nhau, các giá trị loại dữ liệu hỗn hợp khác nhau cũng có thể được chuyển đến tập hợp.Python3

Python3

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
272
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
274
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
31
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
278
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
281
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
272
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
274
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
41
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
290
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
281
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
272
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
274
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
215
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
43
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
45
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
406
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
281

Các

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
430
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
281

Output:

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
4

Truy cập các yếu tố của các bộ

Đặt các mục không thể được truy cập bằng cách tham khảo một chỉ mục, vì các bộ không được đặt hàng nên các mục không có chỉ mục. Nhưng bạn có thể lặp qua các mục đã đặt bằng cách sử dụng vòng lặp cho vòng lặp hoặc hỏi xem giá trị được chỉ định có xuất hiện trong một tập hợp không, bằng cách sử dụng

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
434Keyword.

Python3

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
272
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
274
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
215
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
43
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
45
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
447
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
281
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
453
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
455
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
456
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
457
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
458
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
459
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
461
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
463
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
43
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
457
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
469

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
0

Lưu ý - Để biết thêm về các bộ, tham khảo các bộ Python. To know more about sets, refer Python Sets. To know more about sets, refer Python Sets.

Từ điển

Từ điển trong Python là một tập hợp các giá trị dữ liệu không được đặt hàng, được sử dụng để lưu trữ các giá trị dữ liệu như bản đồ, không giống như các loại dữ liệu khác chỉ chứa một giá trị đơn như một phần tử, từ điển giữ

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
470Pair. Giá trị khóa được cung cấp trong từ điển để làm cho nó được tối ưu hóa hơn. Mỗi cặp giá trị khóa trong một từ điển được phân tách bằng một đại tràng
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
471, trong khi mỗi khóa được phân tách bằng một dấu phẩy.

Tạo từ điển

Trong Python, một từ điển có thể được tạo bằng cách đặt một chuỗi các phần tử trong niềng răng xoăn

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
472, được phân tách bằng ‘dấu phẩy. Các giá trị trong từ điển có thể thuộc bất kỳ kiểu dữ liệu nào và có thể được nhân đôi, trong khi các khóa có thể được lặp lại và phải là bất biến. Từ điển cũng có thể được tạo bởi chức năng tích hợp
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
473. Một từ điển trống có thể được tạo bằng cách chỉ đặt nó vào niềng răng xoăn {}.

Lưu ý - Khóa từ điển nhạy cảm, cùng tên nhưng các trường hợp khóa khác nhau sẽ được xử lý rõ ràng.– Dictionary keys are case sensitive, same name but different cases of Key will be treated distinctly.– Dictionary keys are case sensitive, same name but different cases of Key will be treated distinctly.

Python3

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
476
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
479
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
487
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
489
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
27
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
489__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
702
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
487
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
711
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
489
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
716__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
727
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
735
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
736
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
489
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
27__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
751
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
735
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
760
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
764
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
27__
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
771
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
1

Truy cập các yếu tố của từ điển

Để truy cập các mục của từ điển, hãy tham khảo tên khóa của nó. Khóa có thể được sử dụng bên trong dấu ngoặc vuông. Ngoài ra còn có một phương pháp gọi là

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
777 cũng sẽ giúp truy cập phần tử từ từ điển.

Python3

Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
8
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
487
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
13
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
489
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
68
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
3
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
785___
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
795
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
29
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
785
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
05
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
605
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
73
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
0
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
1
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
474
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
610
Initial String: 
GeeksForGeeks

First character of String is: 
G

Last character of String is: 
s
26
String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
612

Output:

String with the use of Single Quotes: 
Welcome to the Geeks World

String with the use of Double Quotes: 
I'm a Geek


String with the use of Triple Quotes: 
I'm a Geek and I live in a world of "Geeks"


Creating a multiline String: 
Geeks 
            For 
            Life
2Kiểu dữ liệu số trong Python với ví dụ là gì?

Kiểu dữ liệu số trong Python với ví dụ là gì?

Trong Python, loại dữ liệu số đại diện cho dữ liệu có giá trị số.Giá trị số có thể là một số nguyên, số nổi hoặc thậm chí là số phức.Các giá trị này được định nghĩa là int, float và các lớp phức tạp trong Python.Số nguyên - Kiểu dữ liệu này được thể hiện với sự trợ giúp của lớp INT.represents the data that has a numeric value. The numeric value can be an integer, floating number, or even complex number. These values are defined as int, float, and complex classes in Python. Integers – This data type is represented with the help of int class.represents the data that has a numeric value. The numeric value can be an integer, floating number, or even complex number. These values are defined as int, float, and complex classes in Python. Integers – This data type is represented with the help of int class.

Loại dữ liệu số nào?

Các loại dữ liệu số là các số được lưu trữ trong các cột cơ sở dữ liệu.Các loại dữ liệu này thường được nhóm lại bởi: các loại số chính xác, các giá trị trong đó độ chính xác và tỷ lệ cần được bảo tồn.Các loại chính xác là số nguyên, lớn, thập phân, số, số và tiền.numbers stored in database columns. These data types are typically grouped by: Exact numeric types, values where the precision and scale need to be preserved. The exact numeric types are INTEGER , BIGINT , DECIMAL , NUMERIC , NUMBER , and MONEY .numbers stored in database columns. These data types are typically grouped by: Exact numeric types, values where the precision and scale need to be preserved. The exact numeric types are INTEGER , BIGINT , DECIMAL , NUMERIC , NUMBER , and MONEY .

4 loại số khác nhau trong Python là gì?

Python cung cấp bốn loại số cơ bản: số nguyên đơn giản, số nguyên dài, số điểm nổi và số phức.plain integers, long integers, floating point numbers and complex numbers.plain integers, long integers, floating point numbers and complex numbers.

Hai loại dữ liệu số trong Python là gì?

Kiểu dữ liệu số Python giữ các số nguyên dài (tồn tại trong Python 2.x, không được dùng trong Python 3.x).Float- giữ các số chính xác nổi và nó chính xác lên đến 15 số thập phân.long- holds long integers(exists in Python 2.x, deprecated in Python 3.x). float- holds floating precision numbers and it's accurate up to 15 decimal places.long- holds long integers(exists in Python 2. x, deprecated in Python 3. x). float- holds floating precision numbers and it's accurate up to 15 decimal places.