目录

Python-concatenate-list-Python-拼接-list

Python concatenate list (Python 拼接 list)

Python concatenate list {Python 拼接 list}

Python 拼接 list。

1. concatenate_python_list.py

# -*- coding: utf-8 -*-

'''
 ============================================================================
 Name        : concatenate_python_list.py
 Author      : Yongqiang Cheng
 Version     : Feb 29, 2019
 Copyright   : Copyright 2019 ForeverStrong License
 Description : CONCATENATE LIST in Python, Ansi-style
 ============================================================================
'''

label = [[2, 5, 8], [3, 6, 9]]
list_label = []
for index in range(3):
    list_label = list_label + label

print(list_label)

2. Console

/usr/bin/python2.7 /home/strong/dbscan_work/dbscan_performance_evaluation/concatenate_python_list.py
[[2, 5, 8], [3, 6, 9], [2, 5, 8], [3, 6, 9], [2, 5, 8], [3, 6, 9]]

Process finished with exit code 0

References

[1] Yongqiang Cheng,