Skip to content

Instantly share code, notes, and snippets.

@p-acDev
Last active October 11, 2021 20:06
Show Gist options
  • Select an option

  • Save p-acDev/9ff35b9bc674c966d55fc61ef6c1359f to your computer and use it in GitHub Desktop.

Select an option

Save p-acDev/9ff35b9bc674c966d55fc61ef6c1359f to your computer and use it in GitHub Desktop.
Define unique part name
# number of part defining a structure
n = 3
# if we have 10 structures and we want to name each part of the structure with unique name
for i in range(10):
part_name = "S" + str((i//n + 1)) +"_B" + str(i%n + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment