Skip to content

Instantly share code, notes, and snippets.

@bjcubsfan
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjcubsfan/8d67aedcbf95bdce47e9 to your computer and use it in GitHub Desktop.
Save bjcubsfan/8d67aedcbf95bdce47e9 to your computer and use it in GitHub Desktop.
How to make this list
comm_status_names = ['comm_status_00',
'node_id_00',
'comm_status_01',
'node_id_01',
'comm_status_02',
'node_id_02',
'comm_status_03',
'node_id_03',
'comm_status_04',
'node_id_04',
'comm_status_05',
'node_id_05',
'comm_status_06',
'node_id_06',
'comm_status_07',
'node_id_07',
'comm_status_08',
'node_id_08',
'comm_status_09',
'node_id_09',
'comm_status_10',
'node_id_10',
'comm_status_11',
'node_id_11',
'comm_status_12',
'node_id_12']
# Another way is:
comm_status_names = ['comm_status_{num:02d} node_id_{num:02d} '.format(
num=num) for num in range(13)]
comm_status_names = ''.join(comm_status_names)
comm_status_names = comm_status_names.split()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment