mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
Break long lines
This commit is contained in:
parent
dac8702751
commit
4d9a673b5a
@ -239,15 +239,19 @@ def main():
|
||||
|
||||
# expand ranges
|
||||
choices = []
|
||||
for elem in parsed_input: # loop will generate a list of lists
|
||||
# loop will generate a list of lists
|
||||
for elem in parsed_input:
|
||||
left, sep, right = elem.partition('-')
|
||||
if right:
|
||||
choices.append(list(range(int(left), int(right) + 1)))
|
||||
else:
|
||||
choices.append([int(left)])
|
||||
choices = sum(choices, []) # flatten list
|
||||
choices = [str(elem) for elem in choices] # the current code stores the choices as strings instead of ints. not sure if necessary
|
||||
|
||||
# flatten list
|
||||
choices = sum(choices, [])
|
||||
# the current code stores the choices as strings
|
||||
# instead of ints. not sure if necessary
|
||||
choices = [str(elem) for elem in choices]
|
||||
|
||||
# Act on option, if supplied
|
||||
print('')
|
||||
|
Loading…
Reference in New Issue
Block a user