Skip to content

Switch case #7995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 10, 2023
Prev Previous commit
Next Next commit
fixing error C416
  • Loading branch information
meg-1 committed Nov 16, 2022
commit a493d79cc45e42b3729ddac6feadda187ae56a3e
4 changes: 2 additions & 2 deletions maths/remove_digit.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ def remove_digit(num: int) -> int:
if isinstance(num, int):
num_str = str(abs(num))
num_transpositions = [
[char for char in num_str] for char in range(len(num_str))
list(num_str) for char in range(len(num_str))
]
for index in range(len(num_str)):
num_transpositions[index].pop(index)
return sorted(
(
int("".join([char for char in transposition]))
int("".join(list(transposition)))
for transposition in num_transpositions
),
reverse=True,
Expand Down