Created
January 17, 2022 13:36
-
-
Save Cyril-Pop/bce953eff06f70e44a0af6d40a896d23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lena = 1200.0 | |
lenb = 1000 | |
lenc = 2000.5 | |
lend = 4000 | |
# | |
splitlen = 1200 | |
# | |
for curvLen in [lena,lenb,lenc,lend]: | |
quot, remain = divmod(curvLen, splitlen) | |
t = [x for x in [splitlen] * int(quot) + [remain] if x != 0 ] | |
print(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment