Hướng dẫn how to find repeated items in tuple in python - cách tìm các mục lặp lại trong tuple trong python

Cập nhật lần cuối vào ngày 19 tháng 8 năm 2022 21:51:39 [UTC/GMT +8 giờ]

Python Tuple: Tập thể dục-9 với giải pháp

Viết một chương trình Python để tìm các mục lặp đi lặp lại của một tuple.

Giải pháp mẫu:-:-

Mã Python:

#create a tuple
tuplex = 2, 4, 5, 6, 2, 3, 4, 4, 7 
print[tuplex]
#return the number of times it appears in the tuple.
count = tuplex.count[4]
print[count]

Đầu ra mẫu:

[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   

Trình bày bằng hình ảnh:

Flowchart:


Trực quan hóa thực thi mã Python:

Công cụ sau đây trực quan hóa những gì máy tính đang làm từng bước khi nó thực hiện chương trình đã nói:

Trình chỉnh sửa mã Python:

Có một cách khác để giải quyết giải pháp này? Đóng góp mã của bạn [và nhận xét] thông qua Disqus.

Trước đây: Viết một chương trình Python để tạo dấu hai chấm của một tuple. Write a Python program to create the colon of a tuple.
Next: Write a Python program to check whether an element exists within a tuple.

Python: Lời khuyên trong ngày

Cấu trúc Deques [Deques là một khái quát của các ngăn xếp và hàng đợi]:

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4

Cách pythonic để làm điều này là sử dụng bộ sưu tập.

>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]

Counter trả về một đối tượng giống như dict có thể được lặp đi lặp lại, cùng với các hoạt động khác.

Nhiều lần, trong khi làm việc với các bộ dữ liệu Python, chúng ta có thể gặp vấn đề khi loại bỏ các bản sao. Đây là một vấn đề rất phổ biến và có thể xảy ra trong bất kỳ hình thức thiết lập lập trình nào, có thể là lập trình thường xuyên hoặc phát triển web. Hãy để thảo luận về những cách nhất định trong đó nhiệm vụ này có thể được thực hiện. & NBSP;

Phương thức số 1: Sử dụng Set [] + Tuple [] Đây là cách thẳng tiến nhất để loại bỏ các bản sao. Trong đó, chúng tôi chuyển đổi tuple thành một tập hợp, loại bỏ các bản sao và sau đó chuyển đổi nó lại bằng Tuple []. & NBSP; This is the most straight forward way to remove duplicates. In this, we convert the tuple to a set, removing duplicates and then converting it back again using tuple[]. 

Python3

Các

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
8
>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
9
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
1
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
2
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
4
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
5

>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
6=
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0[
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
0
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
5

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
8
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
5
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
4
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
8

Đầu ra

Làm thế nào để tôi tìm thấy một mục lặp đi lặp lại trong Tuple Python?

Viết một chương trình Python để tìm các mục lặp đi lặp lại của một tuple .. 

Giải pháp mẫu:-.

Python3

Mã Python: #Create a tuple tuplex = 2, 4, 5, 6, 2, 3, 4, 4, 7 in [tuplex] #return số lần nó xuất hiện trong tuple. ....

Các

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
8
>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
9
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
1
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
2
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
4
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
5

>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
6=
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0[
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
0
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
5

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
8
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
5
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
4
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
8

Đầu ra

The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]

Làm thế nào để tôi tìm thấy một mục lặp đi lặp lại trong Tuple Python? 

Python3

Các

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
8[
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
16
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
4
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
5

[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
20=
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
22

[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
23
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
24
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
25
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
26

[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
27
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
28
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
24
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
30
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
25
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
32

[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
33
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
34

[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
35=
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
0
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
38

>>> import collections
>>> Q = collections.deque[]
>>> Q.append[1]
>>> Q.appendleft[2]
>>> Q.extend[[3, 4]]
>>> Q.extendleft[[5, 6]]
>>> Q
deque[[6, 5, 2, 1, 3, 4]]
>>> Q.pop[]
4
>>> Q.popleft[]
6
>>> Q
deque[[5, 2, 1, 3]]
>>> Q.rotate[3]
>>> Q
deque[[2, 1, 3, 5]]
>>> Q.rotate[-3]
>>> Q
deque[[5, 2, 1, 3]]

>>> last_three = collections.deque[maxlen=3]
>>> for i in range[4]:
...     last_three.append[i]
...     print ', '.join[str[x] for x in last_three]
...
0
0, 1
0, 1, 2
1, 2, 3
2, 3, 4
8[
[2, 4, 5, 6, 2, 3, 4, 4, 7]                                                                                   
3   
41
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
3
>>> from collections import Counter
>>> t = [1,1,1,1,1,2,2,2,3,3,4,5,6,7,8,9]
>>> c = Counter[t]
>>> c
Counter[{1: 5, 2: 3, 3: 2, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1}]
4
The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]
8

Đầu ra

The original tuple is : [1, 3, 5, 2, 3, 5, 1, 1, 3]
The tuple after removing duplicates : [1, 3, 5, 2]


Làm thế nào để tôi tìm thấy một mục lặp đi lặp lại trong Tuple Python?

Viết một chương trình Python để tìm các mục lặp đi lặp lại của một tuple ...
Giải pháp mẫu:-.
Mã Python: #Create a tuple tuplex = 2, 4, 5, 6, 2, 3, 4, 4, 7 in [tuplex] #return số lần nó xuất hiện trong tuple.....
Trình bày bằng hình ảnh:.
Sơ đồ: ... .
Trình chỉnh sửa mã Python: ....
Có một cách khác để giải quyết giải pháp này ?.

Tuple có thể lặp lại các yếu tố không?

Tuples a Tuple đại diện cho một tập hợp các đối tượng được đặt hàng và bất biến [không thể sửa đổi].Tuples cho phép các thành viên trùng lặp và được lập chỉ mục.Tuples allow duplicate members and are indexed.

Làm thế nào để bạn tính các sự cố trong một tuple?

Phương thức Python Count [] đếm sự xuất hiện của một phần tử trong bộ tuple.Nó trả về sự xuất hiện của phần tử được thông qua trong cuộc gọi. counts the occurrence of an element in the tuple. It returns the occurrence of the the element passed during call.

Bộ dữ liệu lặp lại trong Python là gì?

Biểu tượng * thường được sử dụng để biểu thị phép nhân, tuy nhiên, nó trở thành toán tử lặp lại khi toán hạng ở phía bên trái của * là một tuple.Toán tử lặp lại sao chép một tuple và liên kết tất cả chúng lại với nhau.The repetition operator duplicates a tuple and links all of them together.

Bài Viết Liên Quan

Chủ Đề